iag-geo / bootleaf

An open-source version of IAG's Bootleaf fork
https://demo.bootleaf.xyz
MIT License
88 stars 65 forks source link

Enable Cors Xampp #23

Open fedemap opened 4 years ago

fedemap commented 4 years ago

How to enable xampp header? I can't read the attributes of an external wms layer

slead commented 4 years ago

This isn't my area of expertise, but I put a page at https://github.com/iag-geo/bootleaf/blob/master/reverseProxy.md which explains ways that I was able to get WMS to work using a reverse proxy.

I'm also not sure about xampp but if you're able to get it to work, feel free to submit a PR with the changes.

fedemap commented 4 years ago

In a wms layer through identify how can I return only the name of the layer in the sidebar?

slead commented 4 years ago

see the Identify section of the readme, and specify the name of the WMS layer in the outFields parameter:

"outFields": [
  {"name": "field_name", "alias": "Field Alias", "prefix": "$"},
  {"name": "field alias", "thousands": true, "decimals": 2}
],
fedemap commented 4 years ago

Well, is it possible to call the layer name without getfeatureinfo? So clicking on the wms layer to have its name in the sidebar?

fedemap commented 4 years ago

In the getfeatureinfo where can I insert the proxy url of my php page?

slead commented 4 years ago

The way I normally approach this is outlined in the reverse proxy document, in the final section:

"url": '/proxied_geoserver/wms',

So the WMS layer's URL is pointing at the proxy server version of the layer. There may be other ways to approach this - it's been a few years since I wrote that so I can't remember the reasoning behind it.

Note that you'll need to:

Access your Bootleaf app via port 8080 in order to send the above requests via the reverse-proxy, eg http://localhost:8080/bootleaf/