We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

OSM example

Please, I have a problem with OSM in Maps. (WPF)
Could you write a typical sample of using the OSM map with GPS coordinates in collection and the pin with label.
Thank you. 

1 Reply

RS Ramya Soundar Rajan Syncfusion Team January 24, 2020 06:01 AM

Hi Peter, 
Thanks for contacting Syncfusion support. 
We have prepared the simple SfMaps sample with binding the Markers property from the ViewModel. Added marker label and icon by using the MarkerTemplate property as like in below code. 
        <syncfusion:SfMap x:Name="maps"> 
                <syncfusion:ImageryLayer x:Name="imageryLayer" Markers="{Binding Models}" LayerType="OSM" > 
                            <StackPanel Orientation="Horizontal" Margin="-12,-30,0,0"> 
                                <Image Source="pin.png" Height="30"/> 
                                <TextBlock Margin="5,5,0,0" Foreground="Red" HorizontalAlignment="Center" FontSize="10" FontFamily="Segoe UI" Text="{Binding Data.Name}"/> 
Please find the sample from below location. 
Output Screenshot: 

Live Chat Icon For mobile
Up arrow icon