1

I need to display a WMS layer from my local GeoServer in a mobile application with the Cesium JavaScript Library, but I don't know how to do it.

Can anyone help me?

nmtoken
  • 13,355
  • 5
  • 38
  • 87
mesh
  • 19
  • 1

1 Answers1

2

See the Cesium Sandcastle for an example of how to display GeoServer maps in Cesium.

Also note you will have to enable CORS on GeoServer. Search in GEOSERVER\webapps\geoserver\WEB-INF\web.xml for CORS and un-comment all CORS sections then restart GeoServer. See this question or the GeoServer Manual.

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
A. Mort
  • 395
  • 1
  • 12
  • Thanks your answer. I checked CORS sections, its ok. I already display wms layer from geoserver in web browser. But I can't it in android application. I show only cesium globe but not geoserver map. – mesh May 23 '20 at 11:26
  • Did you try it in Cesium Sandcastle? It has to work there before it has a chance working in your Android app. Use Cesium Sandcastle and the dev tools in either Firefox or Chrome to debug your tile requests. Let me know and I will continue to try to help. – A. Mort May 23 '20 at 16:53
  • Yes I did, code works (without any error or warning) in cesium sandcastle and chrome. But I get only this warning in Mozilla Firefox console. "WebGL warning: generateMipmap: Tex image TEXTURE_2D level 0 is incurring lazy initialization.". I show map from geoserver in chrome, cesium sandcastle, firefox. I displayed only cesium default map in android app. – mesh May 24 '20 at 15:52