aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/angus/position_map.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-06-17 13:57:34 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-07-11 15:03:52 +0100
commit962b881830f9edb4f0b0b5aac3ece87c80af1f0a (patch)
tree222109707006df0f59358308bfb6cb57526a5243 /web/cobrands/angus/position_map.js
parent615e5b7b1cc1a829f4ee982659220a7a01a13639 (diff)
Tidy up JavaScript functions.
Split big functions into smaller more descriptive ones.
Diffstat (limited to 'web/cobrands/angus/position_map.js')
-rw-r--r--web/cobrands/angus/position_map.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/web/cobrands/angus/position_map.js b/web/cobrands/angus/position_map.js
index 31ca1c09a..ce4c9df20 100644
--- a/web/cobrands/angus/position_map.js
+++ b/web/cobrands/angus/position_map.js
@@ -52,14 +52,7 @@ var add_streetlights = (function() {
fixmystreet.markers.features[0].move(lonlat);
// Need to ensure the correct coords are used for the report
- // We can't call fixmystreet_update_pin because that refreshes the category list,
- // clobbering the value we stored in the #form_column_id field.
- lonlat.transform(
- fixmystreet.map.getProjectionObject(),
- new OpenLayers.Projection("EPSG:4326")
- );
- document.getElementById('fixmystreet.latitude').value = lonlat.lat || lonlat.y;
- document.getElementById('fixmystreet.longitude').value = lonlat.lon || lonlat.x;
+ fixmystreet.maps.update_pin(lonlat);
// Make sure the marker that was clicked is drawn on top of its neighbours
var layer = e.feature.layer;