Mapbox GL JS : Large Image Overlay Issues
Mapbox GL JS : Large Image Overlay Issues
I am using Mapbox GL JS to overlay an image of satellite data over Texas. The image is big enough to cover Texas, but even when using 100% correct geo-coords, the image is not in the correct place. I have to split the image into 6 long (west-east) images like such, and stack them vertically in separate image overlays :

This produces the desired result :

When using the 6 stacked image overlays (each 2 degrees tall and very wide to cover the state's width, by the way), the placement of the clouds is exactly perfect with zero issues. It's perfect except that having to make 6 image overlays to build this is not at all ideal and it adding processing constraints.
If I merge all the images into one big picture and overlay it using the same coords - the effect is wrong. Even though the image is exactly the same. I have highlighted the coastline so you can see that when using one large image overlay for the whole state, it becomes inaccurate. For a storm chaser (my target audience) this would not be unacceptable. I have tried manually adjusting the images but it is no good and I have wasted days of my life tracking this issue down, and it is absolutely Mapbox. I have ruled out the other possibilities like bugs in the software I use to get the data.
Here is the bad result with one overlay as opposed to splitting it vertically :

Are there any ideas to what may be causing this, and a solution? I am completely lost.
Well, I can have images that are very long (-110 and -90 but only 2 degrees tall) and it works fine.That was my first image I posted. But I tried the same test north and south (25 to 37, and only 2 degrees west to east) and the problem occurred. Very weird.
– David
Aug 19 at 12:16
Is this the same question as stackoverflow.com/questions/51907688/… ? Can we close one of them?
– Steve Bennett
2 days ago
You can close the other one (if you can) as it was a general question - not relating to Mapbox specifically. The issue was unknown at the time (but only narrowed at this point) This issue appears to be with overlays specifically related to Mapbox. It would probably be unhelpful to someone coming across the other without seeing this question. This question should stay, and the other one closed.
– David
2 days ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
As to what might be causing this: perhaps images are not wrapped around the globe, but instead projected on a plane? Having 6 smaller images would also have this problem but with far less distortion, because when zoomed in enough the globe approximates a plane.
– Geert-Jan
Aug 19 at 12:03