Skip to main content
Home Forums General Silverlight Getting Started Virtual Map Attribute
2 replies. Latest Post by vinay_yadav on September 17, 2009.
(0)
vinay_yadav
Member
0 points
4 Posts
09-08-2009 11:42 AM |
Hi
I want to convert a string value to a "Microsoft.VirtualEarth.MapControl.Core.MapMode" to use it on Virtual Map. I am getting the Mode attribute a s a string from a web service as String and while using
VMap.Mode = (Microsoft.VirtualEarth.MapControl.Core.MapMode)("Road");
it gives an error of conversion.
Any idea?
Thanks in advance.
Jonathan...
All-Star
24939 points
2,425 Posts
09-15-2009 11:33 PM |
Hi Vinay_yadav,
We can set the Mode property to "Road" on your xaml file. Also, we can do it on code behind.
VMap.Mode = new RoadMode(); // Set the Mode to “Road”
VMap.Mode = new AerialMode(); // Set the Mode to “Aerial”
VMap.Mode = new AerialWithLabelsMode(); //Set the Mode to “AerialWithLabels”
http://www.mapforums.com/virtual-earth-silverlight-map-control-ctp-setting-map-mode-view-10079.html
Best regards,
Jonathan
09-17-2009 2:48 PM |
Thanks Jonathan,
I just fixed it. Thanks A lot.