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

Markers when bound to ViewModel errors on Add or Remove from MapMarker list.


I have a SfMap control on a Xamarin Forms page. It has an ImageryLayer with Markers bound to a view model.

The first time it loads, everything works fine. The second time you navigate to the page, if you try to add or remove from the MapMarkers list, it throws an error in SfMaps code.

            ZoomLevel="{Binding ZoomLevel, Mode=TwoWay}">
                    Markers="{Binding MapMarkers, Mode=TwoWay}"
                    GeoCoordinates="{Binding Location, Mode=TwoWay}" />
private ObservableCollection<MapMarker> mapMarkers;

        public ObservableCollection<MapMarker> MapMarkers
            get { return mapMarkers; }
            set { mapMarkers = value; OnPropertyChanged(nameof(MapMarkers)); }

Let me know if you can reproduce the problem or if i should try to get some code together for you to test with. I've been mainly testing with UWP.

1 Reply

MP Michael Prabhu M Syncfusion Team December 12, 2018 07:31 AM UTC

Hi Chase, 

Greetings from Syncfusion, 

We were able to reproduce the issue “Exception raised when dynamically updating the marker collection” and we confirm this as a bug and logged a defect report. You can keep track of the bug from the feedback portal below. 

The fix will be available in our upcoming Volume 4 SP 1 release which is scheduled to be rolled out at end of January 2019. Would waiting for the official release work for you? Otherwise, we can provide a patch if you can create a direct track support incident.  

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal link above. 


Live Chat Icon For mobile
Up arrow icon