I have started with Openlayers 3 recently and I need to add a layer from an own WMS. I have been trying this:
map = new ol.Map({ target:'map', renderer:'canvas', layers: layer, view: new ol.View({ projection: 'EPSG:4326', center: [4, 40], zoom:2 })});var layer = new ol.layer.Tile({ source: new ol.source.TileWMS({ preload: Infinity, url: 'http://ide.cime.es/menorca/wms/base_referencia/', params:{ 'LAYERS':"RE007RUS_municipis", 'TILED':true }})});But this is showing nothing, I don't know what to do. With Openlayers 2 I had the map working, but I need it with Openlayers 3.
Thanks!
أكثر...
map = new ol.Map({ target:'map', renderer:'canvas', layers: layer, view: new ol.View({ projection: 'EPSG:4326', center: [4, 40], zoom:2 })});var layer = new ol.layer.Tile({ source: new ol.source.TileWMS({ preload: Infinity, url: 'http://ide.cime.es/menorca/wms/base_referencia/', params:{ 'LAYERS':"RE007RUS_municipis", 'TILED':true }})});But this is showing nothing, I don't know what to do. With Openlayers 2 I had the map working, but I need it with Openlayers 3.
Thanks!
أكثر...