]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Remove unnecessary $(window).load() callbacks
[rails.git] / app / assets / javascripts / map.js.erb
index d976b9f8c9f0c82ef27010b9608257601ca7257d..8aa9868b32441b9b7f6caae419a637fa6db027bc 100644 (file)
@@ -71,6 +71,16 @@ function createMap(divName, options) {
    });
    map.addLayer(markers);
 
+   map.dataLayer = new OpenLayers.Layer(I18n.t('browse.start_rjs.data_layer_name'), {
+     visibility: false,
+     displayInLayerSwitcher: false
+   });
+   map.addLayer(map.dataLayer);
+
+   $("#" + divName).on("resized", function () {
+     map.updateSize();
+   });
+
    return map;
 }