Articles in this section

How to enable interactive Legend?

To enable the interactive Legend follow the given steps:

Step 1:

Create a map sample and include the necessary script files.

Step 2:

The Legends can be made interactive with an arrow mark indicating the exact range color in the Legend when the mouse hovers over the corresponding shapes. In order to render interactive Legends, set the Legend mode to interactive in the legendSettings.

JS

legendSettings: {
                       mode  : “interactive”
                                }

 

JS

<script type="text/javascript">
            jQuery(function ($) {           
            $("#maps").ejMap({                
               layers: [ 
                     .  .  .
           legendSettings: {
                 showLegend :true,
                              mode  : “interactive”
                                               .      .      .
                                     }
                        ]
                      });
                  });

 

The following screenshot shows the interactive Legend:

 

 


Sample Links:

https://help.syncfusion.com/ug/js/default.htm#!documents/mapelements.htm

https://ej2.syncfusion.com/home/javascript.html

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