Articles in this section
Category / Section

How to customize the marker template in JavaScript Maps?

5 mins read

The following steps explains how to customize the marker template in JavaScript Maps.

Step 1:

Create a map sample and include necessary script files.

Step 2:

Markers are notes that is used to leave some message on the map. To customize the marker you have to set markerTemplate api in layers.

JS

layers: [
            {                                       
                      markers: markers,
                      markerTemplate: 'template'
             }  
         ]                     

 

 

JS

<script type="text/javascript">
        jQuery(function ($) {           
            $("#maps").ejMap({ 
               layers: [
                         {                                         
                            markers: markers,
                            markerTemplate: 'template', 
                            }  
]
});
});

 

The following Screenshot displays the markers.

 

Maps with Markers and tooltip

 

For the more information about markers, refer to the following link.

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

 

For online sample,  refer to the following location.



Conclusion

I hope you enjoyed learning about how to customize the marker template in JavaScript Maps.

You can refer to our JavaScript Maps feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.

For current customers, you can check out our 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 other controls.

If you have any queries or require clarifications, please let us know in the comments section 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