Hello,
I am a beginner in Silverlight and C# programming and i´m creating a Bing Map application.
I try to add pushpins with coordinates and information from a SQL Server, but I can't figure out how to succeed.
Mike
Hello,
I am a beginner in Silverlight and C# programming and i´m creating a Bing Map application.
I try to add pushpins with coordinates and information from a SQL Server, but I can't figure out how to succeed.
Mike
I have added push pins with the code below using latitude and longitude.
XAML markup:
<Grid x:Name="LayoutRoot" Background="White">
<m:Map x:Name="myMap" CredentialsProvider="<Your Key>" Mode="Road"/>
</Grid>
Code to add the push pin with a tooltip:
var location = new Location(latitude, longitude);
var pin = new Pushpin {Location = location};
pin.SetValue(ToolTipService.ToolTipProperty, new TextBlock{Text = "Hello World"});
myMap.Children.Add(pin);
I hope this helps. Please mark this as the answer if it fixes your issue.
Cheers!