sigrennesmetropole / geor_urbanisme_mapstore

GNU General Public License v3.0
2 stars 5 forks source link

Nothing happen when click on a plot #14

Closed jusabatier closed 3 years ago

jusabatier commented 3 years ago

When trying the addon, I activate 'Renseignement d'urbanisme sur la parcelle', and try to click on a plot.

And nothing happen.

In the console, I have some request to the configured layer to retrieve the plot id.

A lot of GetFeature request with various output type (plain, json, ...) on plot's layer => What interest with plain output ?

A lot of GetFeature request with various output type (plain, json, ...) on other visible layers of the context => Useless to query them

Can't test anymore this addon as it doesn't request the backend and display infos.

tdipisa commented 3 years ago

@jusabatier thank you for reporting. It would be good to know the following:

  1. The plugin configuration you are using
  2. Where you are testing the plugin
  3. Which mapstore2-georchestra version you are using (you are using the geosolutions docker image? Which version?)
jusabatier commented 3 years ago
  1. Here is my conf for the addon :
{
  "cfg": {
    "helpUrl": "http://docs.georchestra.org/addon_urbanisme/",
    "cadastrappUrl": "/cadastrapp/services",
    "urbanismeappUrl": "/servitudes",
    "layer": "pci:geo_parcelle"
  },
  "override": {}
} 

And I get the zip from here : https://github.com/sigrennesmetropole/geor_urbanisme_mapstore/releases

  1. I test it on a plot of Le Puy-en-Velay, and I can see that the GetFeature request success to get plot infos.

  2. I get this MapStore version : https://github.com/georchestra/mapstore2-georchestra/actions/runs/589303839 I updated it this morning and it still not work

Here is a link to the context : https://geoportail.lepuyenvelay.fr/mapstore/#/context/test

jusabatier commented 3 years ago

Ok I get the problem :

https://github.com/sigrennesmetropole/geor_urbanisme_mapstore/blob/b30e28fec1c31ea9b33e24b368108a09bd01b2f6/js/extension/epics/urbanisme.js#L276

It is assumed that the parcel id is in the 'id_parc', but the parcel id in the geo_parcelle layer is in the 'geo_parcelle' attribute.

As we can parameter the used layer, I think the id attribute have to be a parameter also.

jusabatier commented 3 years ago

A workaround can be to create a dedicated layer for urbanisme addon in Geoserver which is a view of geo_parcelle with required attributes (id_parc, geom) and use it.

But if it's the choosen solution, I think it have to be documented.

tdipisa commented 3 years ago

@jusabatier thank you. I will check/discuss this with developers.

offtherailz commented 3 years ago

Probably this logic us coming from the original code (1 of the 2 points where id_parc is used) https://github.com/sigrennesmetropole/addon_urbanisme/blob/8fa94350f221e9d6dd8325088bd32ff23f562e4a/src/addon/urbanisme/js/main.js#L279

I'll make it configurable and document it on readme.

jusabatier commented 3 years ago

Just have to document the idParcelleKey property and this issue can be closed.