GeowebCache

How to create a WebMapServiceImageryProvider or TileMapServiceImageryProvider for requesting a GeoWebCache WMS or WMTS endpoint ?

Is there a sample somewhere ?

XL

Adding a GeoWebCache WMS layer via addImageryProvider from geoserver/gwc/service/wms?SERVICE=WMS& shows the data coming through (clicking on the map shows data) but no style is shown.

var wms = imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({

url : ‘http://server:8080/geoserver/gwc/service/wms?SERVICE=WMS&amp’,

layers : ‘geoportal:v_zona_infobox’,

parameters : {

transparent : true,

format : ‘image/png’,

CQL_FILTER: cql

}

}));

I’m not sure if it’s necessary to add the style yourself in the parameters or if it’s special case for Cesium.

Hi

For WebMapTileServiceImageryProvider :

The GetCapability of the service returns me a something like this :

EPSG:4326_carte4326:0 36 38 46 48

Then The tilematrixID for a level is prefixed by tileMatrixSetID.

Then I had to prefix the queryOptions.tilematrix like this queryOptions.tilematrix = imageryProvider._tileMatrixSetID+’:’+level; in the buildImageUrl

It has also MinTileRow MaxTileRow … for each level : but the those parameters could not be used resulting by asking tile not available.

For WebMapServiceImageryProvider

The GetCapabilities returns resolutions and origins. But those parameters are not used resulting of message like

Requested horizontal resolution: 0.0013732910156249445 , best match: 0.00118973050291514 exceeds 10% threshold. Perhaps the client is configured with an incorrect set of scales (resolutions), or the DPI setting is off compared to the one in GWC ?