Over the weekend I've worked on a map. I had to display some pictures and a path. In the past I used Google Maps for a similar work, but this time I had to use Microsoft's Virtual Earth technology, because for the area in question (up the hills in the county where I live) Google Maps and Google Earth have no good quality satellite images. So I spend quite some time working on both sides, and I have to say that each has its own advantage. Virtual Earth birds view images (my house is in this one) are very nice indeed. Recent Google Maps with pictures taken on the roads is impressive (although I had already seen a similar features on Amazon's A9 some time ago).
Programming against the two technologies is similar (well, if you don't consider Google Earth, of course). Both mapping sites allow you to host a map (basically a JavaScript component) in your own site. In case of Google you have to sign up for a free account, Microsoft let's you start coding right away. Documentation is very high quality in both cases, although I tend to prefer Google descriptive one. On the other hand, the wizard / build helper (or Interactive SDK) provided by Microsoft to get you started is very nice. In the end, with both components you can set the center of the map using latitude and longitude, the zoom level, add lines, add pins that open up small HTML surfaces (optionally including images) when activated, provide buttons to pan to other locations and zoom, and the like.
Event handling is slightly different, but not that much. But this is where I found something absolutely shocking. JavaScript is a case sensitive language, but you won't expect a programmer to use the same name with different cases to mean to different things. Even less you'd expect a similar "feature" in an object with a public API. However, this is the case. Here is what I found in this page:
A view object, which has the following properties:
Property |
Description |
latlong |
The center of the map. Includes .latitude and .longitude properties (note lower case names). |
LatLong |
The latitude and longitude (VELatLong object) of the point on the map where the user clicked the mouse. |
Yes, the first two properties of this object do have the same name, with a different CamelCase! "Note the lower case names"? Astonishing...
Getting back to the main topic, I still prefer using Google Maps because of the ways to pass information to them via Google Earth, which in turns interfaces with Google Sketchup. Using this tools (in the reverse order) I was able to import a graph from an AutoCAD drawing, convert it with Sketchup and export it to a map. I couldn't found any similar (free) program to convert the same path to the GeoRSS format used by Microsoft maps.
PS. My story is not as interesting as the one Danny Thorpe recently covered in his blog, mixing and matching Google and Microsoft properties. Notice also that Danny finally unveiled what he worked on while at Google.