missioncommand / emp3-web

Extensible Map Platform (EMP) web development kit
Other
19 stars 9 forks source link

WMTS does not work #331

Closed sjpinizzotto closed 7 years ago

sjpinizzotto commented 7 years ago

WMTS does not allow you to select the important TileMatrixSet parameter and important part of the specification. This is from the API, to the core, down to Cesium. In the Cesium engine, the TileMatrixSet is always set to 'default28mm' which works for the sample service in the API tester, but not some other WMTS services. There are many other services that use tileMatrixSets with different names. The getCapabilities for the WMTS service sends back the available tileMatrixSets and in the layer metadata it displays which tileMatrixSets are available for that layer.

Propose 'tileMatrixSet' property onto WMTS class. Without it, WMTS doesn't make much sense. Propose removing the default28mm default tileMatrixSet from Cesium.

sjpinizzotto commented 7 years ago

Furthermore, the layer parameter in leaflet will never be set because of this code in EmpCesium.js

if (this.isV2Core && item.activeLayers) { sLayers = item.activeLayers.join(); } else if (!this.isV2Core && item.layers) { sLayers = item.layers.join(); }

WMTS does not have any activeLayers, therefore sLayers will always be empty. WMTS can only display one layer at a time. The proper transaction item will have .layer property which should be used for the request.

alberto-acevedo commented 7 years ago

Added the 'tileMatrixSet' to the WMTS class, and to related classes in the API and core. Modified in EMPCesium to expect a single WMTS layer name.

I tested in Cesium and the tileMatrixSet is passed to the engine.

I'm not able to do a push into the dev branch because I have no internet connection. (bad switch)

alberto-acevedo commented 7 years ago

I also added the property to the validation API..

alberto-acevedo commented 7 years ago

test using branch dev.

Use tileMatrixSet = default028mm for Cesium.

Use tileMatrixSet = GoogleMapsCompatible for WW.

mubinakhan commented 7 years ago

Reintegrate

alberto-acevedo commented 7 years ago

Merged into the dev branch. Closing this issue.