From c620bda5d48daf7a3440f0fc6d3479c9ea9adf61 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 19 Feb 2016 15:14:47 +0100 Subject: Rename function to match swapped lat/long. --- templates/map.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/map.mdwn b/templates/map.mdwn index 000c973c..cb3f5935 100644 --- a/templates/map.mdwn +++ b/templates/map.mdwn @@ -15,14 +15,14 @@ L.control.scale({ imperial: false }).addTo(map); function round(n,d) { return Math.round(Math.pow(10,d)*n)/Math.pow(10,d) }; -function lngLatString(latLng) { +function latLngString(latLng) { return round(latLng.lat,5) + ", " + round(latLng.lng,5) }; var popup = L.popup(); function positionPopup(e) { popup .setLatLng(e.latlng) - .setContent("Position (lat, long):
" + lngLatString(e.latlng)) + .setContent("Position (lat, long):
" + latLngString(e.latlng)) .openOn(map); } map.on('contextmenu', positionPopup); -- cgit v1.2.3