Skip to main content

Microsoft Silverlight

Answered Question Virtual Map AttributeRSS Feed

(0)

vinay_yadav
vinay_yadav

Member

Member

0 points

4 Posts

Virtual Map Attribute

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.

~Vinay

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft
Answered Question

Re: Virtual Map Attribute

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

 

 

 

 

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

vinay_yadav
vinay_yadav

Member

Member

0 points

4 Posts

Re: Virtual Map Attribute

Thanks Jonathan,

 I just fixed it. Thanks A lot.

 

 

~Vinay
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities