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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Displaying custom markers on an OpenStreetMap map

Thread ID:





145297 Jun 16,2019 10:24 PM UTC Jun 18,2019 05:36 AM UTC Xamarin.Forms 3
Tags: SfMaps
James Lavery
Asked On June 16, 2019 10:24 PM UTC

I need to display a list of markers on an SfMaps control, with the markers defined in a List - i.e. have an ItemsSource for the Layer.

However, it seems that ItemsSource is only available for a ShapeFileLayer.

How can I have a List of items displayed on an ImageryLayer? I need to create a custom Marker with bound properties - the attributes of the marker being bound to the Item's properties (to display wind speed and direction at the location).



Bharathiraja K [Syncfusion]
Replied On June 17, 2019 12:50 PM UTC

Hi James, 
Greetings from Syncfusion. ShapeFileLayers’s ItemsSource property is used to bound the data to the shape file. You can add the custom marker in a Markers collection and bind the properties using MarkerTemplate as like the below code snippet. 
<maps:ImageryLayer Markers="{Binding CustomMarkers}"> 
                        <StackLayout Orientation="Horizontal"> 
                        <Image Source="{Binding ImageName}" Scale="1"  
                               Aspect="AspectFit " HorizontalOptions="StartAndExpand" VerticalOptions="Center"  
                               HeightRequest="15" WidthRequest="23" /> 
                        <Label Text="{Binding Label}"/> 
Please find the sample for your reference. 
Refer the following help document link for to know more about Markers. 

James Lavery
Replied On June 17, 2019 12:55 PM UTC

Thank you - that's exactly what I needed!



Rachel A [Syncfusion]
Replied On June 18, 2019 05:36 AM UTC

Hi James, 
Thanks for your feedback. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon