georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

Bookmarks in Search not working #402

Closed jusabatier closed 3 years ago

jusabatier commented 3 years ago

I'm trying to setup the Bookmarks in the Search plugin.

Here is my config :

{
  "cfg": {
    "withToggle": [
      "max-width: 768px",
      "min-width: 768px"
    ],
    "maxResults": 10,
    "showBookMarkSearchOption": true,
    "showCoordinatesSearchOption": false,
    "searchOptions": {
      "services": [
        {
          "type": "wfs",
          "priority": 10,
          "displayName": "${properties.nom}",
          "options": {
            "url": "/geoserver/wfs",
            "typeName": "referentiels:communes",
            "queriableAttributes": [
              "nom"
            ],
            "sortBy": "nom",
            "srsName": "EPSG:4326",
            "maxFeatures": 10
          }
        }
      ]
    }
  },
  "override": {}
}
{
  "cfg": {
    "zoomOnSelect": true,
    "bookmarkEditing": "MAPSTORE_ADMIN"
  },
  "override": {}
}

I also tried with bookmarkEditing set to ROLE_MAPSTORE_ADMIN.

The problem is that when load the context, in Search option I only have the Adress search options :

https://geoportail.lepuyenvelay.fr/mapstore/#/context/Exemple

Is there something I miss in the configuration ?

My version is : geOrchestra-1.2.0

jusabatier commented 3 years ago

Ok, my bad, I assumed that bookmarkEditing is binded to Georchestra's roles, but it's binded to mapstore's ones.

So we have to set bookmarkEditing to ADMIN.