aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-04 07:39:10 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-04 07:39:10 +0000
commit32cb826ae50efd512677a5ea890a647af3cd0aa0 (patch)
tree14d8a1bb03c2dc0087da379a525456dd992f544c /web
parentd46cf8c5c8f292e1121f5d07ab3772f62c6bacd6 (diff)
Fix bad map JavaScript.
Diffstat (limited to 'web')
-rw-r--r--web/js/map-OpenLayers.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index e9e51113c..3639549f8 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -273,8 +273,8 @@ $(function(){
// Set it up our way
var layer;
- if (!fixmystreet.layer_options.length) {
- fixmystreet.layer_options = [ fixmystreet.layer_options ];
+ if (!fixmystreet.layer_options) {
+ fixmystreet.layer_options = [ {} ];
}
for (var i=0; i<fixmystreet.layer_options.length; i++) {
fixmystreet.layer_options[i] = OpenLayers.Util.extend({
@@ -285,7 +285,7 @@ $(function(){
if (fixmystreet.layer_options[i].matrixIds) {
layer = new fixmystreet.map_type(fixmystreet.layer_options[i]);
} else {
- layer = new fixmystreet.map_type("", fixmystreet.layer_options);
+ layer = new fixmystreet.map_type("", fixmystreet.layer_options[i]);
}
fixmystreet.map.addLayer(layer);
}