Browse Source

Rapide correction pour que la cartographie ne soit pas toujours générée

recurrent
echarp 8 years ago
parent
commit
f6d3a9fbba
  1. 21
      app/assets/javascripts/maps.js.coffee

21
app/assets/javascripts/maps.js.coffee

@ -5,14 +5,15 @@
#= require openlayers-rails
$(document).ready ->
map = new OpenLayers.Map 'map'
layer = new OpenLayers.Layer.WMS 'OpenLayers WMS',
'http://vmap0.tiles.osgeo.org/wms/vmap0', {
layers: 'basic'
}
map.addLayer layer
map.setCenter new OpenLayers.LonLat(2.5, 46.4), 7
map.addControl new OpenLayers.Control.LayerSwitcher()
if $('#map').size() > 0
map = new OpenLayers.Map 'map'
layer = new OpenLayers.Layer.WMS 'OpenLayers WMS',
'http://vmap0.tiles.osgeo.org/wms/vmap0', {
layers: 'basic'
}
map.addLayer layer
map.setCenter new OpenLayers.LonLat(2.5, 46.4), 7
map.addControl new OpenLayers.Control.LayerSwitcher()
map.addLayer eventsLayer
map.addLayer lugsLayer
map.addLayer eventsLayer
map.addLayer lugsLayer

Loading…
Cancel
Save