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