From 3b505e7b551239bd8a52387a1569a2679a6affc3 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Fri, 20 Jan 2017 11:03:24 -0300 Subject: [PATCH] refs #10 add lat/lng fields in popup to view/edit coordinates with precise values --- js/gpxedit.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/gpxedit.js b/js/gpxedit.js index f92bac6..65d8e33 100644 --- a/js/gpxedit.js +++ b/js/gpxedit.js @@ -446,6 +446,9 @@ function load_map() { buttonParent.find('select[role=symbol]').val('unknown'); } buttonParent.find('select[role=symbol]').change(); + var latlng = gpxedit.layersData[id].layer.getLatLng(); + buttonParent.find('input.layerLat').val(latlng.lat); + buttonParent.find('input.layerLon').val(latlng.lng); } }); @@ -475,6 +478,8 @@ function onCreated(type, layer){ ''+t('gpxedit', 'Description')+''+ ''+t('gpxedit', 'Comment')+''; if (type === 'marker') { + popupTxt = popupTxt + ''+t('gpxedit', 'Lat')+''; + popupTxt = popupTxt + ''+t('gpxedit', 'Lon')+''; popupTxt = popupTxt + ''+t('gpxedit', 'Symbol')+'