As I'm sure most of you already know, Microsoft's recent (October 15th) release of their new version of Live Maps is getting a lot of attention. While I'm as excited as everyone else about the new features, I'm much more interested in getting at these features through Virtual Earth's JavaScript map control. Well, I decided to take some time today to update one of my web map applications to the new version of the map control. Here's a rundown of my experience, including what I'm most excited about:
After switching to the v6 map control (http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6), the first thing I noticed was the new control. It's the same one that Live Maps uses. I must say that I really like it; It takes up less space, has nice transparency, and the ability to contract and expand it adds a lot to the overall experience.
However, immediately after noticing this I noticed a couple of problems with my application that required my attention:
-
None of my GeoRSS data were showing up. After looking into this, though, I realized that my JavaScript was incorrect (due to a hack), and - after a few simple changes - everything was back up and running. It's strange that the v5 map control let my errors slide, but I'm assuming that there must have been a fix in the underlying JavaScript that invalidated my code.
-
My custom icons were not displaying. This was, again, because of a workaround that I implemented in v5 of the map control. After going back and correcting a couple of things (read: making them conform to standards), this problem was taken care of.
And that's it! Those were the only problems that I ran into with the switch to the new map control, and both were necessary because of workarounds that I had to implement in v5 of the map control. I must say that I'm impressed with how easy it was. The upgrade from v4 to v5 was much more painful, but it looks like those painful changes are starting to pay off in time and effort saved now.
Some fixes that I've already noticed:
-
The SetCenterAndZoom method seems to be working correctly now. In v5 of the map control, it was inconsistent and I had to revert back to setting the center and then zooming to a point with two different methods.
-
Like in Live Maps, the 3D map control works *much better than it did in the v5 release. The overall experience is much smoother (especially in Firefox), and the data are looking better than ever.
-
It looks like the CSS has been touched up a bit, as well. With the v5 map control (and a couple of map control releases before it) the info boxes often showed up unattached to a particular point when hovering over the point in Internet Explorer. My workaround required creating my own custom info boxes and turning off Virtual Earth's. Hopefully I'll be able to abandon this workaround now.
Some enhancements to the SDK that I'm excited about (for a complete list, see the version changelist):
-
VEAltitude Enumeration - Gives developers the ability to find the altitude of any point on the globe.
-
VEMap.GetDirections Method - Allows for multi-point routing. This is a great addition.
-
VEMapStyle Enumeration - Added the "Shaded" value. It was possible to get to this in v5 of the map control, but it is now accessible through the LoadMap and SetMapStyle methods.
-
VEMatchConfidence Enumeration - Gives developers access to the accuracy of a returned geocode. This is an extremely useful feature that Google's geocode service has had since its 2.59 release. Microsoft still isn't as far along as Google on this one though; they only return three possible values (High, Medium, and Low), whereas Google returns nine values (0 being the least accurate (unknown) and 8 being the most accurate(address level)) and even gives developers access to "failure reasons", making it possible to let the user know why his/her geocode failed. That said, with this VEMatchConfidence Enumeration and the VEMatchCode Enumeration, Microsoft is moving in the right direction.
-
VERouteOptimize Enumeration - Allows developers to specify how a route is optimized. The options include Default (no route optimization is done), MinimizeTime, and MinimizeDistance.
-
There are also a handful of new 3D methods. It makes a lot of sense for Microsoft to continue to focus its resources on furthering Virtual Earth's 3D capabilities, as these capabilities are what really set it apart from the rest of the pack.
A random observation:
-
It looks like disambiguation is now turned off by default for the geocode service. When I searched for "Denver", I was taken straight to Denver with no other options presented to me. With v5 of the map control, I was always asked if I meant "Denver" the city or "Denver" the county.
All in all, I'm very impressed with this release. There are enough new features to get me excited, but I'm just as excited about some of the fixes. As I continue to work with this new version of the map control, I'll post about my experiences here.