Virtual Earth API: Using Shaded Map Style

A new map style was added for the Virtual Earth v6 Map Control API which allows you to have shaded relief maps.  For example, here is a screenshot of the traditional road map style (VEMapStyle.Road) in Virtual Earth over the Grand Canyon:

Here is the same location using the new shaded map style:

To use the new Shaded map style, you just need to pass the VEMapStyle.Shaded property to the LoadMap call at init:

map = new VEMap('myMap');
map.LoadMap(new VELatLong(36.291883, -112.806930), 12, VEMapStyle.Shaded);

or you can call SetMapStyle with the shaded property:


Here's a link to a working example showing the new shaded map style:

Virtual Earth API Shaded Map Style Example

Comments (3)

  1. bjarke says:

    It seems to be implemented somewhat half-heartedly. You can enable shaded style programatically, but once you click "road" in the navigator you are back to the old flat tiles with no possibility to go back to the shaded look. I hope a fix for this will be available soon, either by enabling both styles in the navigator, or by making "road" mean "shaded" if the map is loaded that way.

  2. Keith Kinnan says:

    Thanks for the feedback.  You can attach an event to the "onchangemapstyle" event and in the callback detect if the style is Road and then set it back to shaded. For example:

    function EventMapStyleChange(e)


      if (map.GetMapStyle() == VEMapStyle.Road)





    map.AttachEvent(‘onchangemapstyle’, EventMapStyleChange);

    Now, when you click on Road in the navigation control, it will select the Shaded map style. However, the navigation control will not change to select Road. We are investigating improving this in the future.

Skip to main content