1

I'm building a layer tree and I would like it to be updated automatically when the page is loaded with layer that are in a specific workspace on GeoServer.

In my layer tree I have a group containing background layers such as Bing satellite and OSM, and another group that will contain the GeoServer layers.

How can I request the layers from the workspace and add them automatically?

  • look at the getCapabilities response and parse it into a list – Ian Turton Jan 22 '16 at 14:50
  • I'm not sure how to retrieve what I get in the XML file and transform it into a layer list callable by Openlayers... – kaycee Jan 22 '16 at 15:43
2

You don't have that (yet) on GeoExt 3. Meanwhile, you might check another smaller project focused on managing layers, called extjs_ol3_layercontrol. It is also written in ExtJS.

Check the blog and the github.

If you add the Geoserver capabilities URL (something like http://localhost:8080/geoserver/wms?service=wms&version=1.3&request=GetCapabilities) to ol.control.LayerControl you can add your layers from it.

  • thank you very much for sharing this. I am working on extjs 6 and Geoext 3 but my layer tree couldn't show in mvc sencha app. When I looked at the openlayers tool, I couldn't find any information on how to use it on ExtJs 6. Is it possible to use it for extjs 6? – wondim May 10 '17 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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