My app has a map component that I create within a Stacklayout in the XAML like this:
<maps:Map x:Name="amap">
<x:Arguments>
<maps:MapSpan>
<x:Arguments>
<maps:Position>
<x:Arguments>
<x:Double x:Name="Lat">48.2</x:Double>
<x:Double x:Name="Long">-106.6501939</x:Double>
</x:Arguments>
</maps:Position>
<x:Double>0.01</x:Double>
<x:Double>0.01</x:Double>
</x:Arguments>
</maps:MapSpan>
</x:Arguments>
</maps:Map>
I then get a location from a db search, drop a pin at that location and pan to it:
private void MoveMap(Quarter location)
{
var pin = new Pin();
pin.Position = new Position(location.Lat, location.Lon);
pin.Label = locationEntry.Text;
MoveMap(pin);
}
private void MoveMap(Pin pin)
{
amap.Pins.Add(pin);
amap.MoveToRegion(new MapSpan(pin.Position, 0.1, 0.1));
}
So far so good, but if I click on the pin it gets better...
I'm looking for a way to get the links to Google maps on the bottom to appear right off the bat. I would also like to make the label show on the pin. I've tried calling amap.SendMapClicked(pin.Position)
right after the call to MoveToRegion, but nothing happens.
And finally I would like to display the "mode selector" from Google maps, which switches between satellite and default.
Is any of this possible? Lots of googling doesn't give me much hope.