aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-08-03 19:09:26 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-08-13 19:35:36 +0100
commit502423c7a1ce0fc93657b08fd935aa380890d091 (patch)
treebb874709f3dfe6d503ee56cf0ff6f719527876ee /web/js/map-OpenLayers.js
parentc0bead8312c3339ecce0a4886e15a45d5ceeaca8 (diff)
Allow inspectors to change report asset.
This hopefully copes with assets displayed by category or by group, and updates the button to show/hide on category change.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 1a04756c5..553fd6c3a 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -132,14 +132,11 @@ $.extend(fixmystreet.utils, {
new OpenLayers.Projection("EPSG:4326")
);
- var lat = transformedLonlat.lat.toFixed(6);
- var lon = transformedLonlat.lon.toFixed(6);
-
- document.getElementById('fixmystreet.latitude').value = lat;
- document.getElementById('fixmystreet.longitude').value = lon;
-
+ fixmystreet.maps.update_pin_input_fields(transformedLonlat);
$(fixmystreet).trigger('maps:update_pin', [ lonlat ]);
+ var lat = transformedLonlat.lat.toFixed(6);
+ var lon = transformedLonlat.lon.toFixed(6);
return {
'url': { 'lon': lon, 'lat': lat },
'state': { 'lon': lonlat.lon, 'lat': lonlat.lat }