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

This commit is contained in:
echarp 2014-06-25 13:47:56 +02:00
parent 11223fbfa3
commit f6d3a9fbba

View File

@ -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