aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet-uk-councils/roadworks.js12
-rw-r--r--web/cobrands/fixmystreet/assets.js10
-rw-r--r--web/cobrands/zurich/layout.scss3
-rw-r--r--web/js/map-OpenLayers.js15
-rw-r--r--web/js/map-wmts-base.js23
5 files changed, 18 insertions, 45 deletions
diff --git a/web/cobrands/fixmystreet-uk-councils/roadworks.js b/web/cobrands/fixmystreet-uk-councils/roadworks.js
index f4da4c310..2b0de306a 100644
--- a/web/cobrands/fixmystreet-uk-councils/roadworks.js
+++ b/web/cobrands/fixmystreet-uk-councils/roadworks.js
@@ -222,16 +222,4 @@ fixmystreet.roadworks.display_message = function(feature) {
$msg.prependTo('#js-post-category-messages');
};
-/* Stop sending a needless header so that no preflight CORS request */
-OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = function(sName, sValue) {
- if (sName.toLowerCase() == 'x-requested-with') {
- return;
- }
- if (!this._headers) {
- this._headers = {};
- }
- this._headers[sName] = sValue;
- return this._object.setRequestHeader(sName, sValue);
-};
-
})();
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index 9113c95a2..0b2205076 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -947,16 +947,6 @@ OpenLayers.Format.GML.v3.MultiCurveFix = OpenLayers.Class(OpenLayers.Format.GML.
CLASS_NAME: "OpenLayers.Format.GML.v3.MultiCurveFix"
});
-OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = function(sName, sValue) {
- if (sName.toLowerCase() == 'x-requested-with') {
- return;
- }
- if (!this._headers) {
- this._headers = {};
- }
- this._headers[sName] = sValue;
- return this._object.setRequestHeader(sName, sValue);
-};
})();
/* Handling of body override functionality */
diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss
index 97ae8fc4a..d98afba5d 100644
--- a/web/cobrands/zurich/layout.scss
+++ b/web/cobrands/zurich/layout.scss
@@ -315,6 +315,9 @@ body.mappage.admin {
font-weight: bold;
position: absolute;
}
+ .index-status .message-updated {
+ margin-top: -1.5em;
+ }
}
.admin-nav-wrapper {
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index ab04d15c9..1588bda2e 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -562,6 +562,9 @@ $.extend(fixmystreet.utils, {
} else {
$.extend(style.defaultStyle, { fillColor: 'black', strokeColor: 'black' });
}
+ if (!this.features.length) {
+ return;
+ }
var geometry = this.features[0].geometry;
if (geometry.CLASS_NAME == 'OpenLayers.Geometry.Collection' ||
geometry.CLASS_NAME == 'OpenLayers.Geometry.MultiPolygon') {
@@ -1185,3 +1188,15 @@ OpenLayers.Renderer.SVGBig = OpenLayers.Class(OpenLayers.Renderer.SVG, {
CLASS_NAME: "OpenLayers.Renderer.SVGBig"
});
+
+/* Stop sending a needless header so that no preflight CORS request */
+OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = function(sName, sValue) {
+ if (sName.toLowerCase() == 'x-requested-with') {
+ return;
+ }
+ if (!this._headers) {
+ this._headers = {};
+ }
+ this._headers[sName] = sValue;
+ return this._object.setRequestHeader(sName, sValue);
+};
diff --git a/web/js/map-wmts-base.js b/web/js/map-wmts-base.js
index a8dd21074..43f829ab5 100644
--- a/web/js/map-wmts-base.js
+++ b/web/js/map-wmts-base.js
@@ -28,27 +28,4 @@ fixmystreet.maps.setup_wmts_base_map = function() {
tileOrigin: new OpenLayers.LonLat(fixmystreet.wmts_config.origin_x, fixmystreet.wmts_config.origin_y)
});
});
-
- // Give main code a new bbox_strategy that translates between
- // lat/lon and our WMTS layer's coordinates
- fixmystreet.map_bbox_strategy = new OpenLayers.Strategy.ReprojectBBOX({
- ratio: 1
- });
};
-
-OpenLayers.Strategy.ReprojectBBOX = OpenLayers.Class(OpenLayers.Strategy.BBOX, {
- getMapBounds: function() {
- // Get the map bounds but return them in lat/lon, not
- // local coordinates
- if (this.layer.map === null) {
- return null;
- }
-
- var localBounds = this.layer.map.getExtent();
- // Transform bound corners into WGS84
- localBounds.transform( new OpenLayers.Projection(fixmystreet.wmts_config.map_projection), new OpenLayers.Projection("EPSG:4326") );
- return localBounds;
- },
-
- CLASS_NAME: "OpenLayers.Strategy.ReprojectBBOX"
-});