Friday, May 27, 2011

Bing Maps and Google Maps are off in the Bahamas

I was pretty blown away when I started debugging an issue for one of our users.


He reported that he would mark a way point on the web (using Google Maps), and when it went over to the phone (using Bing Maps), it showed up in the wrong place.  Now this is a pretty serious claim since that's pretty much the one thing that we should never mess up.


I started by asking our Q.A. team to confirm the issue.  They reported back that they couldn't reproduce the issue (which was some relief), but the user seemed pretty sure so I hit him up for some more specific details.  He provided a latitude and longitude, and when I retested with that, I was able to reproduce.


The point was in the Bahamas, so I started trying to brainstorm the things that could be different about the map there:


The Map Projection (Nope)
Maybe there is some funny rule for the area because Cylindrical Mercator projection doesn't work well there?  That couldn't be because that projection is the basis of the tile system that everyone uses.


Google:

Google Maps uses a variant of the Mercator projection for its map images


(Google) Maps uses Mercator because it preserves angles


Bing
We chose to use the Mercator projection



The Datum (Nope)
Maybe there is a special datum that people use here? --Maybe.  Most of the world uses WGS84/NAD83, and our apps support that plus NAD27, but there are plenty of other datums out there.


Google:
Google Maps are the GPS coordinates based on the WGS 84 datum


Bing:
The latitude and longitude are assumed to be on the WGS 84 datum




The Map Data


This can't be wrong right?  It's Bing and Google... No way either of these guys get this wrong... they can't afford to get this stuff wrong... Right?



After looking at it pretty closely, it looks like it's just a pretty simple problem: The Google Maps and Bing Maps are offset from eachother.  I don't know who is more right, but they just don't match, and all other things seem to match up, so I'm sold.  I think one of them is just plain wrong.  I tried a number of other sources, and it looks most likely that BING is wrong, but since I'm not sitting in the Bhamas with a GPS unit, I'm not sure :-)


UPDATE: The guys on the bing forums looked into this and found compelling evidence that Bing Maps are right and Google Maps are wrong.   The best way to see this is by checking out this map:http://maps.google.com/maps?t=k&ie=UTF8&ll=25.228858,-76.272143&spn=0.00757,0.013937&z=17
Here you can see that the tiles just stop stitching correctly on Google's Maps.  When you turn on the Street layer you can see that even the vector data doesn't line up correctly.
Thanks for helping identify the guilty part  



So far this is the only place I've seen bad data from bing, but I'll keep my eye out for it now :-)

Thanks to our LizardLeg for spotting the issue.

2 comments:

alastaira said...

It's Google Maps that's wrong, not Bing maps. Investigation and explanation here:
http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/b2c61dc8-b544-4c60-aefa-0708e0a3cf51

Bob Wold said...

@tanoshimi: Thanks. I'll update the blog to blame google instead, and post the question to them. :-)

Thanks to you and richard_brundrit for looking into it.