Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Is it possible to use Xamarin.Maps to add map pins in Xaml?

$
0
0

I would like to put a map in xaml with 1 pin on it with a bound location. I initially thought that:

        <maps:Map x:Name="map" Grid.Row="2" HorizontalOptions="Fill" VerticalOptions="Fill" IsVisible="{Binding CustomerSearchControlViewModel.MapIsDisplayed}" >
          <maps:Pin Address="{Binding Address, Converter={StaticResource AddressToStringConverter}" Position="{Binding Customer.Position}"/>
        </maps:Map>

Would be the solution, but this keeps throwing Sequence contains no matching elements

Is map.Pins.Add(pin) the only way to add a pin to a map? If so It's not very mvvm friendly


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>