Recent Blog Posts RSS
ViaWindowsLive on Via Virtual Earth Blog
The new ViaWindowsLive community site has launched and features not only a definitive set of resources on all Live Services from Microsoft but also a special section on Virtual Earth including a new site gallery for you to upload your sites, new articles on Version 6, including getting started guide, an interactive quick guide, location finder and more. Subscribe to the VWL aggregated blog to stay in touch with everything Live Services related. Find all the great content from this site and much, much more. Explore how other Live Services can compliment Virtual Earth and your applications.
Version 5 URL changed - Error: 'VEMap' is undefined on Via Virtual Earth Blog
It has been reported that the old url to access the Version5 javascript for Virtual Earth no longer works. This is effecting sites worldwide.
The correct way to reference the Version 5 javascript is:
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
If you have been effected a forum thread has been started here
Silverlight Virtual Earth viewer on Via Virtual Earth Blog
With the launch of silverlight yesterday I was digging around and found this viewer for Virtual Earth by Greg Schechter. It does use the 1.1 alpha of silverlight. It gives some interesting ideas for where Virtual Earth could be headed. Certainly the demo of the performance of silverlight compared to javascript for processing showed a significant increase. This could be very useful.
And of course on the gamer front check this out by Andy Beaulieu and shoot down some UFO's over Birdseye images.
John.
So much new Virtual Earth Imagery Worldwide. on Via Virtual Earth Blog
I subscribe to all the VE blogs and recently the posts about updated imagery has been more and more frequent.
The latest is here and for myself downunder we saw three updates, Canberra, Newcastle and Uluru:


Derek Chan posts 3 Articles in a month! on Via Virtual Earth Blog
A big thank you to the efforts of Derek Chan who posted his third VE article today (he actually had it ready weeks ago but had to wait for Mr Bottleneck here at VVE ;) )
The 3 articles are all relivant to Version 5 of Virtual Earth and deal with the Mini Map, debugging javascript and now custom pins in routes.
All these can now be found in our articles section.
If you have something to contribute send us an email.
John (The bottleneck)
Customizing Route Pushpins in V5 RSS
Using Virtual Earth version 5.0, you can create driving routes with automatically generated pushpins along the route that contain the driving itinerary inside the pushpin bubbles. After a VEMap.GetRoute call is made in Version 5.0, a VERoute object is returned. The VERoute has itinerary directions but has no information as to the co-ordinate of the route pushpins and no access to their InfoBox descriptions. This article will discuss how to manipulate these pushpins and generate your own version 5.0 route pushpins.

Figure 1 - Customized route pushpins
The "_dm" Object
To actually manipulate these route pushpins, it's important to take a look at the "_dm" object. Basically this object is part of the VEMap class and is used to handle calls to/from the Virtual Earth's directions.ashx handler. You will utilize the _dm.RemoveRoutePins method to clear all the existing route pins (without removing the route polyline or any existing pushpins on the map) and the _dm.veroutecache array, which holds the route pushpins.

Figure 2 - Breaking down the "_dm" object using Firebug
When a route is generated in version 5.0, the _dm.veroutecache array is populated with the resulting route pushpins in the route callback function. Upon further inspection (see highlighted in Figure 3), you will notice that the pushpins being stored in the _dm.veroutecache array are actually version 4.0 pushpins. You can export all the version 4.0 pushpin information and generate your own set of version 5.0 pushpins.

Figure 3 - A Version 4.0 pushpin being wrapped inside the veroutecache
To create your own customized route pushpins:
- In your route callback, iterate through the veroutecache and pull out the pushpin information to generate your own VEShape instance
- Store your created VEShape in an array
- Make a call to _dm.RemoveRoutePins
- Pull the VEShapes out of your array and plot them on the map.
It's important to note that a call to _dm.RemoveRoutePins will delete all the route pins on the map as well as clearing the veroutecache, so you will need to examine all the old route pushpin information before you delete the actual pushpins from your map.
Conclusion
You can find the sample code of how to do this here. I've also added in the start/end markers (which are the first and last elements in the veroutecache array). Finally, I've included customized numbered pushpins which was taken from Keith Kinnan's blog at: http://blogs.msdn.com/keithkin/archive/2007/05/16/virtual-earth-api-creating-numbered-pushpins.aspx
Article contributed by Derek Chan (www.infusion.com). Have you got something to contribute?


