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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Update map annotations

Thread ID:





131129 Jun 22,2017 01:38 PM UTC Jun 23,2017 06:55 AM UTC WinForms 1
Tags: Maps
Asked On June 22, 2017 01:38 PM UTC


In my application I show some coordinates on the map as annotations to the main ShapeLayer. The map shows them correctly, but at runtime, the list of annotations may change depending on user input. But whilst the list of annotation changes, the circles shown on the map do not. How can I make the map update when its viewmodel changes?

This is my annotation type:

    public class ConnectionAnnotation : Annotation
        public ConnectionViewModel Connection { get; set; }
        public Countries Country { get; set; }

        public ConnectionAnnotation(ConnectionViewModel connection,
            DbGeography location, Countries country)
            Connection = connection;
            Longitude = location.Longitude ?? 0;
            Latitude = location.Latitude ?? 0;
            Country = country;

The map is bound to an ObservableCollection<Annotation> yet it does not change when the annotation list changes.

            shapeLayer.Annotations = viewModel.AnnotationList;

            newMapsControl1.AnnotationDrawing += mapsControl_AnnotationDrawing;


So can you please help me update / refresh the map?
I tried 


but it did not work!

Best wishes!

Ashwin Kumaravel [Syncfusion]
Replied On June 23, 2017 06:55 AM UTC

Hi MS,

Thank you for using Syncfusion products,

We have validated your query, could you please call Refresh method along with UpdateLayers to refresh the map elements?

Please refer the following code snippet for your references,


Please get back us if you have any concern.



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

or the page will be automatically redirected to 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