aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/js/map-OpenLayers.js5
-rw-r--r--www/js/views/around.js9
2 files changed, 10 insertions, 4 deletions
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js
index b285d89..c6e56c3 100644
--- a/www/js/map-OpenLayers.js
+++ b/www/js/map-OpenLayers.js
@@ -109,6 +109,11 @@ function fixmystreet_onload() {
},
styleMap: pin_layer_style_map
};
+
+ fixmystreet.report_location = new OpenLayers.Layer.Vector("Report", pin_layer_options);
+ fixmystreet.report_location.setVisibility(false)
+ fixmystreet.map.addLayer(fixmystreet.report_location);
+
if (fixmystreet.page == 'around') {
fixmystreet.bbox_strategy = new OpenLayers.Strategy.BBOX({ ratio: 1 });
pin_layer_options.strategies = [ fixmystreet.bbox_strategy ];
diff --git a/www/js/views/around.js b/www/js/views/around.js
index 0c1eaf1..e2630d8 100644
--- a/www/js/views/around.js
+++ b/www/js/views/around.js
@@ -163,6 +163,7 @@
$('#postcodeForm').show();
$('#reposition').hide();
fixmystreet.bbox_strategy.activate();
+ fixmystreet.report_location.setVisibility(false);
fixmystreet.markers.setVisibility(true);
fixmystreet.select_feature.activate();
}
@@ -170,9 +171,9 @@
setReportPosition: function(lonlat, convertPosition) {
var markers = fms_markers_list( [ [ lonlat.lat, lonlat.lon, 'green', 'location', '', 'location' ] ], convertPosition );
- fixmystreet.markers.removeAllFeatures();
- fixmystreet.markers.addFeatures( markers );
- fixmystreet.markers.setVisibility(true);
+ fixmystreet.report_location.removeAllFeatures();
+ fixmystreet.report_location.addFeatures( markers );
+ fixmystreet.report_location.setVisibility(true);
},
onClickMark: function(e) {
@@ -204,7 +205,7 @@
new OpenLayers.Projection("EPSG:4326"),
fixmystreet.map.getProjectionObject()
);
- fixmystreet.markers.features[0].move(lonlat);
+ fixmystreet.report_location.features[0].move(lonlat);
$('#reposition').hide();
},