Map Control only applies colours after browser resize

I have a blazor map control which is hosted in another blazor component.  In the OnInitializedAsync I call a method on the child map component to add he map color data. I then call StateHasChanged on the map component.


The colors do not seem to be applied until i resize the browser , then the color mappings appear.  Any ideas wha the issue could be ?


4 Replies 1 reply marked as answer

SB Swetha Babu Syncfusion Team June 23, 2021 03:54 PM UTC

Hi Chris, 
  
Thank you for contacting Syncfusion support. 
  
We are trying to create the Blazor application based on your requirement. However, we will check the reported scenario and update you with further details on June 24, 2021. Meanwhile, please share us a simple Blazor application that reproduces the reported issue. 
  
Regards, 
Swetha Babu 



SB Swetha Babu Syncfusion Team June 24, 2021 03:47 PM UTC

Hi Chris, 
 
Thank you for your patience. 
 
We have created a blazor application based on your requirement. We have updated the DataSource of the Maps component by calling the UpdateColor() method from the AppData class in the OnInitializedAsync() method and rendered the color mapping for the Maps component. Please find the below sample link for your reference. 
 
 
In the above application, we have rendered the simple world map with color mapping. Please let us know if the above sample meets your requirement. If not, please modify the above application to reproduce the reported scenario. 
 
Regards, 
Swetha Babu.

Marked as answer

SS Sarasilmiya Shahul Hameed Syncfusion Team June 28, 2021 01:09 PM UTC

 From: Chris Gilliam  
Sent: Monday, June 28, 2021 8:03 AM
To: Syncfusion Support <[email protected]>
Subject: Re: Syncfusion support community forum 166573, Map Control only applies colours after browser resize, has been updated
  
Ok thanks. Please ignore previous email. I have it working now. 

From: Chris Gilliam
Sent: 28 June 2021 13:50
To: Syncfusion Support <[email protected]>
Subject: Re: Syncfusion support community forum 166573, Map Control only applies colours after browser resize, has been updated.
 
  
Hi, 
 
I can not update the layers of the map on the OnInitializedAsync method of my Map component as I change the colours at a later stage after initialization . 
 
I have my map component defined as : 
 
 
 
In the partial code-behind file I have added a method called ShowMapMaturitylevels which i call from the parent component , when this method is called the new map colours need to be applied  
 
 
 
How ever what I am finding is that the colors are only changing when I resize the browser.  



SB Swetha Babu Syncfusion Team June 29, 2021 11:32 AM UTC

Hi Chris, 
 
Thank you for your update. 
 
Please let us know if you need further assistance. 
 
Regards, 
Swetha Babu.

Loader.
Up arrow icon