georchestra / mapstore2-cadastrapp

repository for the mapstore2 version of cadastrapp
GNU General Public License v3.0
2 stars 10 forks source link

cadastre layer always added on top when opening cadastrapp #166

Open landryb opened 2 years ago

landryb commented 2 years ago

that's a difference in behaviour with what we have in mapfishapp, and i'm pretty sure this was specified: if the cadastre layer is already present in the map (eg same url/ WMS/WMTS mode), right now ms2-cadastrapp adds it inconditionally on top.

That's annoying if you've built a map with other layers above the cadastre layer, which are now hidden behind the duplicate cadastre layer.

That also generates useless requests.. in mapfishapp we had an heuristic to avoid loading again the layer if it was already present in the context.

@catmorales @MaelREBOUX ?

MaelREBOUX commented 1 year ago

Hello @landryb

Need investiguation / confirmation but for me you need to clearly separate 2 concepts :

See the requirements : https://docs.georchestra.org/cadastrapp/latest/guide_installation/couches_applicatives.html#publication-des-couches-applicatives

landryb commented 1 year ago

i'm pretty sure i have all this right in the config:

landryb commented 1 year ago

@pierrejego thinks that the check to add or not the layer is done on the internal layer id - eg here the layer with id __CADASTRAPP_RASTER_LAYER__ is updated or added if not present in the map. @offtherailz does this ring a bell to you ?

previously in mfapp, the check was done on the layer url/name, which is what we expect here. I don't want to have to fiddle with the json stored in the db to set an internal layer id to some arcane constant, if that's the case...