I have a working openlayers2 application currently. To create the WMS layer in OL2, I use:
layer = new OpenLayers.Layer.WMS('WMS', '../../WMS/floorplan?', { layers: '@Model.LayerName', version: '1.3.0', format: "image/png", shapefile: '@Model.ShapeFile' }, { isBaseLayer: true, singleTile: false, yx: [] });My equivalent on OL3 is
var layers = [ new ol.layer.Tile({ source: new ol.source.TileWMS({ url: '../../WMS/floorplan?', params: { 'LAYERS': '@Model.LayerName', 'SHAPEFILE': '@Model.ShapeFile' } }) }) ]; var map = new ol.Map({ layers: layers, target: 'map', view: new ol.View({ extent: ext, projection: parameters.projection, center: [0, 0], zoom: 0.5 }) });However, the OL3 one only gets a single tile from the WMS call while the OL2 one gets all the tiles and renders it correctly. What could the issue be?
أكثر...
layer = new OpenLayers.Layer.WMS('WMS', '../../WMS/floorplan?', { layers: '@Model.LayerName', version: '1.3.0', format: "image/png", shapefile: '@Model.ShapeFile' }, { isBaseLayer: true, singleTile: false, yx: [] });My equivalent on OL3 is
var layers = [ new ol.layer.Tile({ source: new ol.source.TileWMS({ url: '../../WMS/floorplan?', params: { 'LAYERS': '@Model.LayerName', 'SHAPEFILE': '@Model.ShapeFile' } }) }) ]; var map = new ol.Map({ layers: layers, target: 'map', view: new ol.View({ extent: ext, projection: parameters.projection, center: [0, 0], zoom: 0.5 }) });However, the OL3 one only gets a single tile from the WMS call while the OL2 one gets all the tiles and renders it correctly. What could the issue be?
أكثر...