amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 347 forks source link

Error when trying to bind: DataTemplateContent' does not support values of type 'Pin #798

Open npehrsson opened 1 year ago

npehrsson commented 1 year ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

Severity Code Description Project File Line Suppression State Error XLS0504 Property 'DataTemplateContent' does not support values of type 'Pin'.

ACTUAL SCREENSHOTS/STACKTRACE

        <Grid>
            <maps:Map
              x:Name="Map"
              X="{Binding MapX}"
              CameraPosition="{Binding CameraPosition}"
              ItemsSource="{Binding Locations}">
                <maps:Map.ItemTemplate>
                    <DataTemplate>
                        <maps:Pin 
                            Label="{Binding Title}"
                            Position="{Binding Position}"
                            />
                    </DataTemplate>
                </maps:Map.ItemTemplate>

EXPECTED BEHAVIOR

To Compile and work.