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 not rendered after DataSource update

When page initializes, I am  loading two markers as DataSource.  These markers are rendered correctly. 
If the user chooses a new location from a dropdown list, the markers' DataSource is updated (name, lat, long) but the markers are not rendered, although the tooltip shows the new name.
However, if the zoom factor is changed using the mouse wheel or the map is dragged, then the new markers are rendered.

4 Replies

BP Baby Palanidurai Syncfusion Team July 25, 2019 11:59 AM UTC

Hi Erdasa, 
Sorry for the inconvenience.  
We have replicated the reported issue at our end. The maps control is not refreshed when the data source of the marker is updated dynamically. So we have created a feedback for this and we will resolve this issue in our upcoming patch release, which is expected to be roll out on or before 31st July, 2019.  
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 
Please let us know if you have any concerns. 

BP Baby Palanidurai Syncfusion Team August 21, 2019 06:57 AM UTC

Hi Erdasa, 

Thanks for your patience. 

We have resolved your reported issue in our latest Blazor package release. We have deprecated our current package to Syncfusion.EJ2.Blazor from Syncfusion.EJ2.AspNet.Core.RazorComponents. You can use the latest ( Syncfusion.EJ2.Blazor NuGet package version and updated interop CDN file to get rid of the reported issue. 

Kindly revert us, if you have any concerns. 


AB Ankit Bansal December 8, 2019 08:10 AM UTC

Can you please let me know how this is achievable ?

I tried in the latest version which is rolled out in december 2019 .Could not make it work ?

AR Arun Raji Syncfusion Team December 9, 2019 11:39 AM UTC

Hi Ankit, 
We are validated your scenario. The reported scenario has not reproduced at our end. Even though the dynamic marker update has been working properly at our end in last blazor release, which is mentioned below. We have prepared a simple blazor sample in below location for your reference.  

Code snippet –  
<EjsMaps Height="@height" Width="@width" @ref="Mapp"> 
   <MapsBorder Color="black" Width="1"></MapsBorder> 
    <MapsZoomSettings Enable="true" ZoomFactor="1"></MapsZoomSettings> 
        <MapsLayer UrlTemplate="http://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level?authuser=0" LayerType="ShapeLayerType.OSM"> 
            <MapsShapeSettings Fill="#E5E5E5"> 
                <MapsShapeBorder Width="0.2" Color="black"></MapsShapeBorder> 
                <MapsMarker DataSource="MarkerDataSource" Visible="true" Height="20" Width="20"> 
                    <MapsMarkerTooltipSettings Visible="true" ValuePath="name"></MapsMarkerTooltipSettings> 
@code { 
    EjsMaps Mapp { get; set; } 
    private string height { get; set; } = "100%"; 
    private string width { get; set; } = "100%"; 
    public ObservableCollection<MarkerData> MarkerDataSource { get; set; } 
    public class MarkerData 
        public double latitude { get; set; } 
        public double longitude { get; set; } 
        public string name { get; set; } 
        public static ObservableCollection<MarkerData> GetData() 
            ObservableCollection<MarkerData> MarkerDataSource = new ObservableCollection<MarkerData>() { 
                new MarkerData{ latitude= 45.240416, longitude= -100.310779, name= "South Dakota" } 
            return MarkerDataSource; 
    protected override void OnInitialized() 
        this.MarkerDataSource = MarkerData.GetData(); 
    public void add() 
        this.MarkerDataSource.Add(new MarkerData { latitude = 19.1555762, longitude = 72.8849595, name = "Mumbai" }); 
Let us know if you have any other concern. 


Live Chat Icon For mobile
Up arrow icon