Setting height and width to TileWMS layer in Openlayers 3

المشرف العام

Administrator
طاقم الإدارة
I'm trying to setup a TileWMS layer in Openlayer 3 as

var baseMap = new ol.layer.Tile({ title: "MayBase Map", source: new ol.source.TileWMS({ url: mapUrl, params: {'LAYERS': 'GIS_Demo', 'TILED': true,'SRS':'EPSG:900913','WIDTH':256,'HEIGHT':256}, serverType: 'geoserver' }) });
But when i actually request I get the URL like

http://localhost:8080/geoserver/gwc...336446315,8629434.745283257,1457807.003454883

Here even though I am setting the height and width of 256 each its somehow overriding the default values of 205 (for more view docs).

This is basically causing the GWC error as : 400: The requested tile dimensions 205x205 do not match those of the grid set (256x256)

Why is this happening? is this a bug? or is there any other way of specifying the width and height?

Thanks.



أكثر...
 
أعلى