Skip to content

It is a plugin measuring tool in meters for the Leaflet library

License

Notifications You must be signed in to change notification settings

kartena/Leaflet.MeasuringTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Measuring tool (L.MeasuringTool)

With this class you get the option measure the distance of a path. The new change makes it possible to measure the distance between multiple points. There is an option to show distance between points, 'displayPartialDistance' which is set to false by default, and to show the total distance, 'displayTotalDistance' which is true by default. The class allows you style the line as well as the tooltip which shows the distance info. Also it allows you to set the icons for the start and stop points in the map. You will be able to grab the icons and move them at will. The distance is updated.

Code example:

    measuringTool = new L.MeasuringTool(map);
    measuringTool.enable();
	
    //use the method disable to terminate the measuring.
    measuringTool.disable();

Version support

This library is compatible with Leaflet since version 0.4.5 up to 1.1.0.