Extract layer configuration to map.js
This commit is contained in:
parent
5f0c590c32
commit
3b1f455dd9
2 changed files with 6 additions and 8 deletions
|
@ -71,6 +71,12 @@ 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();
|
||||
});
|
||||
|
|
|
@ -128,14 +128,6 @@ end
|
|||
function mapInit(){
|
||||
map = createMap("map");
|
||||
|
||||
<% unless STATUS == :api_offline or STATUS == :database_offline %>
|
||||
map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", {
|
||||
visibility: false,
|
||||
displayInLayerSwitcher: false
|
||||
});
|
||||
map.addLayer(map.dataLayer);
|
||||
<% end %>
|
||||
|
||||
<% unless object_zoom %>
|
||||
<% if bbox %>
|
||||
var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue