Articles in this section
Category / Section

How to align the Map legends?

1 min read

To enable the alignment of the jQuery Map legends, follow the given steps.

 

Step1: Create a Map sample, and include the necessary script files.

 

Step 2: By enabling the alignment of the Map legend, you can change the alignment according to your requirement. It can be near, far, or center for each of the top, bottom, left, or right position.

 

  legendSettings: {
                   showLegend:true,
                   dockOnMap:true,
                   dockPosition: "top",              
                   alignment:"far"                
               },

 

  $("#map").ejMap({
               dataSource: population_data,
               colorValuePath: "Growth",
                      legendSettings: {
                   showLegend:true,
                   dockOnMap:true,
                   dockPosition: "top",          
                   alignment:"far"                
               },
});

 

The following screenshot shows the alignment for Map legends:

 

Legend far alignment in maps

Figure 1: Legend at far alignment

Sample Link:

https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapLegendAlignmentSample1474294054.zip

 

Conclusion

I hope you enjoyed learning about how to align the Map legends.

You can refer to our jQuery Map’s feature tour page to know about its other groundbreaking feature representations. You can also explore our jQuery Map documentation to understand how to present and manipulate data.

For current customers, you can check out our jQuery components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our jQuery Map and other jQuery components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied