imageOverlay not supported
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 380
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
I tried adding imageoverlay, but it doesn't seem right. Any help? Thx!
CC: @jieter
``` lang=javascript
function drawTileLayer(l) {
if (l instanceof L.TileLayer) layerQueue.defer(handleTileLayer, l);
else if (l instanceof L.ImageOverlay) layerQueue.defer(handleImageOverlay, l);
else if (l._heat) layerQueue.defer(handlePathRoot, l._canvas);
}
...
function handleImageOverlay(imgOverlay, callback) {
var imgBounds = imgOverlay.getBounds(),
bounds = new L.Bounds(
map.latLngToLayerPoint(imgBounds.getNorthWest()),
map.latLngToLayerPoint(imgBounds.getSouthEast())),
size = bounds.getSize();
var ctx = canvas.getContext('2d');
ctx.drawImage(imgOverlay._url, bounds.min.x, bounds.min.y, size.x, size.y);
callback(null, { canvas: canvas });
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with drawTileLayer and handleImageOverlay in the issue example, then compare the ImageOverlay path with the existing TileLayer handling. Determine what is wrong with the current image-overlay rendering and verify that an overlay appears correctly in the generated image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100