aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorpezholio <pezholio@gmail.com>2017-05-05 15:49:43 +0100
committerpezholio <pezholio@gmail.com>2017-05-05 15:49:43 +0100
commitf2cd1e6b05eaeb6f88716c3c5988ffe3ebf1296f (patch)
tree137d6c4a5d0abcb8fc9f30cf31bd13dda9350b3a /web/js/map-OpenLayers.js
parent153225c079eae50cb8e2e2e024c468c9ba3146c1 (diff)
Allow inspectors to shortlist all reports in view
If zoom level is >= 14, then inspectors can click a button that marks all reports in the map view as shortlisted
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index b53246279..f0f3dca44 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -2,7 +2,9 @@ var fixmystreet = fixmystreet || {};
(function() {
- fixmystreet.maps = {
+ fixmystreet.maps = fixmystreet.maps || {}
+
+ $.extend(fixmystreet.maps, {
// This function might be passed either an OpenLayers.LonLat (so has
// lon and lat), or an OpenLayers.Geometry.Point (so has x and y).
update_pin: function(lonlat) {
@@ -198,7 +200,7 @@ var fixmystreet = fixmystreet || {};
}
fixmystreet.markers.redraw();
}
- };
+ });
var drag = {
activate: function() {
@@ -541,6 +543,9 @@ var fixmystreet = fixmystreet || {};
fixmystreet.map.addControl( fixmystreet.select_feature );
fixmystreet.select_feature.activate();
fixmystreet.map.events.register( 'zoomend', null, fixmystreet.maps.markers_resize );
+ fixmystreet.map.events.register( 'zoomend', null, function() {
+ fixmystreet.run(fixmystreet.maps.show_shortlist_control)
+ });
// Set up the event handlers to populate the filters and react to them changing
$("#filter_categories").on("change.filters", categories_or_status_changed);