Skip to content

MrMufflon/Leaflet.Coordinates

Folders and files

NameName
Last commit message
Last commit date
Oct 7, 2015
Dec 7, 2016
Mar 2, 2016
Apr 7, 2015
Dec 7, 2016
Jun 4, 2013
Mar 2, 2016
Jun 4, 2013
Jul 20, 2017
Apr 29, 2016
Aug 15, 2016

Repository files navigation

Leaflet.Coordinates

What is this?

A Leaflet plugin to view mouse coordinates. Also the user can change the coordinates and get a marker on that position viewing the coordinates.

Tested with Leaflet 0.5+

Demo anyone?

Have a look

How to use?

L.control.coordinates({
	position:"bottomleft", //optional default "bootomright"
	decimals:2, //optional default 4
	decimalSeperator:".", //optional default "."
	labelTemplateLat:"Latitude: {y}", //optional default "Lat: {y}"
	labelTemplateLng:"Longitude: {x}", //optional default "Lng: {x}"
	enableUserInput:true, //optional default true
	useDMS:false, //optional default false
	useLatLngOrder: true, //ordering of labels, default false-> lng-lat
	markerType: L.marker, //optional default L.marker
	markerProps: {}, //optional default {},
	labelFormatterLng : function(lng){return lng+" lng"}, //optional default none,
	labelFormatterLat : function(lat){return lat+" lat"}, //optional default none
	customLabelFcn: function(latLonObj, opts) { "Geohash: " + encodeGeoHash(latLonObj.lat, latLonObj.lng)} //optional default none
}).addTo(map);

Releases

License

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.