I was working on a v5 static map showing the locations for various aspects of the WW2 Aleutian Island Campaign, and ran into a curious problem. The locations I want to display are on both sides of the 180 degrees longitude line, and this is causing issues.
My base map has the following URL:
https://www.mapquestapi.com/staticmap/v5/map?key={MYKEY}¢er=53.4,-176.5&zoom=6&size=1200,500
I can add a marker showing the bombing of Dutch Harbor with no problem:
https://www.mapquestapi.com/staticmap/v5/map?key={MYKEY}¢er=53.4,-176.5&zoom=6&size=1200,500&defaultMarker=via-00FF00&locations=53.89,-166.54
But if I add a marker for the location of the U.S. Southern Force landing zone at Attu Island, not only does it not display, but the entire map gets shifted:
https://www.mapquestapi.com/staticmap/v5/map?key={MYKEY}¢er=53.4,-176.5&zoom=6&size=1200,500&defaultMarker=via-00FF00&locations=53.89,-166.54||52.854,173.211
Through some experimentation I found that if my map traverses 180 degrees longitude, only locations on the same side of 180 degrees as the map center will be displayed. Trying to display locations on the other side of 180 degrees will cause the map displayed to be shifted from the specified center, and the location's marker will not appear.
Am I doing this wrong somehow, or is there an issue with the API? If the former, what is the correct way to handle this? If the latter, is there a way around the problem?
Ouch. So, if I want a map with points on either side of 180° longitude, I basically have to give up being able to position it myself. At least in this case there's not much difference.