Map background color

Hi,

I am trying to change the white background in the Map control and cannot figure out how to do this.

My goal (to show with blue that there is water surrounding all the continents):


When trying this:
   var syncfusionMap = new ej.maps.Maps({
         background: "blue",
         ....

I am getting a blue frame around the map - but it doesn't change the background of the map itself.

Any help is very much appreciated.

Thank you,
Daniel

3 Replies 1 reply marked as answer

SB Swetha Babu Syncfusion Team January 25, 2021 09:53 AM UTC

Hi Daniel, 
  
Thank you for contacting Syncfusion support. 
  
We can set the background color for the area of the map such as ocean using the background property in mapsArea property of the Maps control. Please find the code snippet for setting the background color for the ocean area in the Maps control below. 
  
Code Snippet
var maps = new ej.maps.Maps({   
        mapsArea: { 
            background: "blue" 
        }, 
        layers: [ 
            { 
                shapeData: world_map, 
            } 
        ]       
 }); 
  
However, we have created a simple JavaScript application to demonstrate the same and it can be downloaded from the following link. 
  
  
Please let us know if you need any further assistance. 
  
Regards, 
Swetha Babu 


Marked as answer

DA Daniel January 25, 2021 10:28 AM UTC

Hi Swetha,

fantastic - thank you very much for your quick help.

Cheers,
Daniel


SA Sabari Anand Senthamarai Kannan Syncfusion Team January 26, 2021 05:40 AM UTC

Hi Daniel, 
 
We are happy to hear that the provided solution meets your requirement. Please let us know if you need any further assistance. 
 
Regards, 
Sabari Anand

Loader.
Up arrow icon