Category / Section
How to render the Legend?
1 min read
To render the Legend, follow the given steps.
Step 1
Create a map sample and include the necessary script files.
Step 2
A Legend is a key used on a JavaScript map. It contains symbols with descriptions. It provides valuable information for interpreting what the map is displaying.
For enabling the Legend visibility, set api showLegend to true in the legendSettings.
legendSettings: { showLegend: true, },
HTML
<script type="text/javascript"> jQuery(function ($) { $("#maps").ejMap({ layers: [ { . . . legendSettings: { showLegend:true, mode: "interactive", . . . } } ] }); }); </script>
The following screenshot represents the Legend visibility.
Sample Links
https://help.syncfusion.com/ug/js/default.htm#!documents/mapelements.htm