mapbox-gl-js
mapbox-gl-js copied to clipboard
Image overlay extent accuracy
mapbox-gl-js 2.8.2
browser: chrome/firefox
Steps to Trigger Behavior
Add an image layer Draw the image extent as a geojson polygon The extents do not match
Link to Demonstration
https://jsbin.com/juturac/edit?html,output
Enable cross origin requests as it links to an external image
Expected Behavior
I would expect the polygon and the image extent to match
Actual Behavior
There is a minor offset
QGIS Behavior
This is the same raster data loaded in QGIS
Here the extent is the same as the rendered geojson polygon. So it looks like there is some offset when rendering images.
I have submitted this issue before #9396 and it was marked as a duplicate of #9158. #9158 is fixed now but this issue still occurs.
@dirkvdb The image you link isn't worknig for me, but I can recreate this by replacing it with https://placekitten.com/g/100/100
.
Yes you need to enable cross origin requests since the image is hosted elsewhere, but indeed any image will reproduce it
Confirmed, still experiencing this with ImageSource
Raster layers using the https://github.com/rnmapbox/maps library. Easy to demonstrate by drawing an outline at the same coordinates as the image layer — they do not line up.
@SnailBones Just wanting to follow up here. We're seeing this issue and it is mission-critical for us in our use of Mapbox. Happy to have @insanj or myself follow up with any other information anyone needs for this