aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/cobrands/fixmystreet-uk-councils/alloy.js4
-rw-r--r--web/cobrands/northamptonshire/assets.js10
2 files changed, 12 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet-uk-councils/alloy.js b/web/cobrands/fixmystreet-uk-councils/alloy.js
index 064237072..1ceabef66 100644
--- a/web/cobrands/fixmystreet-uk-councils/alloy.js
+++ b/web/cobrands/fixmystreet-uk-councils/alloy.js
@@ -28,7 +28,7 @@ OpenLayers.Protocol.Alloy = OpenLayers.Class(OpenLayers.Protocol.HTTP, {
},
getURL: function(coords, options) {
- return OpenLayers.String.format(options.base, {'layerid': options.layerid, 'layerVersion': options.layerVersion, 'z': 15, 'x': coords[0], 'y': coords[1]});
+ return OpenLayers.String.format(options.base, {'layerid': options.layerid, 'environment': options.environment, 'layerVersion': options.layerVersion, 'z': 15, 'x': coords[0], 'y': coords[1]});
},
getTileRange_: function(bounds, maxExtent, map) {
@@ -117,7 +117,7 @@ OpenLayers.Strategy.Alloy = OpenLayers.Class(OpenLayers.Strategy.FixMyStreet, {
fixmystreet.assets.alloy_defaults = {
http_options: {
- base: "https://alloy-api-tile01.yotta.co.uk/api/render-layer/tile/${layerid}/28/${layerVersion}-/${z}/${x}/${y}",
+ base: "https://alloy-api-tile01.yotta.co.uk/api/render-layer/tile/${layerid}/${environment}/${layerVersion}/${z}/${x}/${y}",
},
format_class: OpenLayers.Format.GeoJSON,
srsName: "EPSG:3857",
diff --git a/web/cobrands/northamptonshire/assets.js b/web/cobrands/northamptonshire/assets.js
index 9749784ab..f6a0c8558 100644
--- a/web/cobrands/northamptonshire/assets.js
+++ b/web/cobrands/northamptonshire/assets.js
@@ -360,12 +360,19 @@ OpenLayers.Layer.NCCVectorAsset = OpenLayers.Class(OpenLayers.Layer.VectorAsset,
CLASS_NAME: 'OpenLayers.Layer.NCCVectorAsset'
});
+var is_live = false;
+if ( location.hostname === 'www.fixmystreet.com' || location.hostname == 'fixmystreet.northamptonshire.gov.uk' ) {
+ is_live = true;
+}
// default options for northants assets include
// a) checking for multiple assets in same location
// b) preventing submission unless an asset is selected
var northants_defaults = $.extend(true, {}, fixmystreet.assets.alloy_defaults, {
class: OpenLayers.Layer.NCCVectorAsset,
protocol_class: OpenLayers.Protocol.Alloy,
+ http_options: {
+ environment: is_live ? 26 : 28
+ },
non_interactive: false,
body: "Northamptonshire County Council",
attributes: {
@@ -442,6 +449,9 @@ $.each(layers, function(index, layer) {
// an asset.
var northants_road_defaults = $.extend(true, {}, fixmystreet.assets.alloy_defaults, {
protocol_class: OpenLayers.Protocol.Alloy,
+ http_options: {
+ environment: is_live ? 26 : 28
+ },
body: "Northamptonshire County Council",
road: true,
always_visible: false,