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?

1 Answer 1

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.

3
  • 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
    Commented May 23, 2020 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
    Commented May 23, 2020 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
    Commented May 24, 2020 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.