X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7ad58d1411289ad241a49abb87e414ff13b60173..6ef19d7e1876bb1f5ab806f7b6dedae19b9da3ee:/app/assets/javascripts/map.js.erb diff --git a/app/assets/javascripts/map.js.erb b/app/assets/javascripts/map.js.erb index d976b9f8c..8aa9868b3 100644 --- a/app/assets/javascripts/map.js.erb +++ b/app/assets/javascripts/map.js.erb @@ -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; }