Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening MapStore with parameters #476

Closed
tdipisa opened this issue Feb 1, 2022 · 19 comments
Closed

Opening MapStore with parameters #476

tdipisa opened this issue Feb 1, 2022 · 19 comments

Comments

@tdipisa
Copy link
Collaborator

tdipisa commented Feb 1, 2022

Access mapstore directly with one or more layers loaded, set in a request (Get or POST).
This means generating a mapstore map on the fly from all the parameters of the URL to meet
the following needs.

Acceptance Criteria

Allow the visualisation of layers from the metadata catalogue (GeoNetwork)

From the catalog here clicking on the "visualisaton button", will open mapfishapp with the layer loaded.

In Geonetwork:
image

In Mapfishapp:
image

Be able to replace the sviewer

Sviewer is a very light geOrchestra viewer that we use so that municipalities can simply integrate maps into their html site. These maps are created on the fly through parameters provided in the GET request. But this viewer is not supported yet.
Here is an example of a map created with the sviewer:
https://app.sig.rennesmetropole.fr/sviewer/?x=-191043&y=6132971&z=16&lb=0&title=Ma%20carte&layers=app%3Asv_sitorg_sport%2Capp%3Asv_metier_v_star_arret_physique

Here is the code: https://github.com/georchestra/sviewer
The goal is to replace sviewer by mapstore.

To create maps on fly, at Rennes Metropole we develop a sviewer generator to create parametrized URLs: https://app.sig.rennesmetropole.fr/sviewer_generator/

Other useful informations

Here the idea is to have the ability to configure the map template via the URL (GET) or by POST request :

  • define the center via x and y
    -> possible to perform identify (getFeatureInfo) on center at startup (optional)
  • define the loaded background
  • define loaded layers
    -> define used style (optional)
    -> define CQL filter (optional)

Those functions are very useful for communication purposes, it allow us and our partners to :

  • create their own maps
  • highlight some features via the URL
  • share a lot of various thematic maps from the same context (IFrame) which are included in other sites

Relative issue in MapStore geosolutions-it/MapStore2#8006

@tdipisa
Copy link
Collaborator Author

tdipisa commented Feb 1, 2022

I'm going to summarize below what is already available and what need to be done:

define the center via x and y

Available:
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/openlayers/10358?center=-73.64899635314943,40.589449604232975&zoom=16

define the map extent

Available:
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/openlayers/10358?bbox=-73.66959571838379,40.5820432230782,-73.62839698791505,40.59685516520073

possible to perform identify (getFeatureInfo) on center at startup (optional)

Partially available, we can review existing action capabilities or add one more option to the above:
https://mapstore.readthedocs.io/en/v2021.02.01/developer-guide/map-query-parameters/#map-info

define loaded layers

Available:
https://mapstore.readthedocs.io/en/v2021.02.01/developer-guide/map-query-parameters/#add-layers

define the loaded background

TODO. The background layer be injected in the same way of other layers in overlay (point above)

define used style (optional)
define CQL filter (optional)

TODO. The style name of the layer should be specified in the request

@landryb
Copy link
Member

landryb commented Apr 20, 2022

define loaded layers

Available: https://mapstore.readthedocs.io/en/v2021.02.01/developer-guide/map-query-parameters/#add-layers

fwiw i wouldnt say it's available "like in sviewer", as @jusabatier commented in geosolutions-it/MapStore2#8006 (comment) (but the issue has since then been closed without further discussion)

right now it's not straightforward for a user to just 'add a layer from the address bar' as on needs the full

?actions=[{"type": "CATALOG:ADD_LAYERS_FROM_CATALOGS", "layers": ["workspace1:layer1"], "sources":["catalog"]}]

which is a bit cumbersome and error-prone to type, compared to just layers=workspace:layername in sviewer - which assumes there's a notion of "default source to take layers from".

to reduce friction, maybe we could:

  • assume that if no type is specified, then we want to add a layer ?
  • assume that if there's no catalog specified, then the layer should come from one the of catalogs defined as default ? (eg in localConfig.json, for a single catalog, add a "defaultCatalog: true" flag ?)

that would result in ?actions=[{"layers":["workspace:layername"]}] while if still a bit hard to type but would be a little bit better for @jusabatier ?

@jusabatier
Copy link
Contributor

I just tested opening a context by using a POST request with 'map' parameter, but it doesn't work.
It looks to work using GET params, but not when send them as POST.

Isn't POST parameters handles available ?

@tdipisa
Copy link
Collaborator Author

tdipisa commented Jun 8, 2022

Hi @jusabatier it should be. Let us to double check, please.

@alexander-fedorenko
Copy link
Contributor

Hi @jusabatier,

Could you provide us with some information to investigate this? I tested it on our dev instance using sample html file from documentation and it works fine with the following data:

{"version":2,"map":{"center":{"x":-1.6698564039805779,"y":48.10838006814022,"crs":"EPSG:4326"},"maxExtent":[-20037508.34,-20037508.34,20037508.34,20037508.34],"projection":"EPSG:3857","units":"m","zoom":17,"mapOptions":{},"layers":[{"id":"mapnik__0","group":"background","source":"osm","name":"mapnik","title":"Open Street Map","type":"osm","visibility":true,"singleTile":false,"dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"useForElevation":false,"hidden":false},{"id":"undefined__1","group":"background","source":"ol","title":"Empty Background","type":"empty","singleTile":false,"dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"useForElevation":false,"hidden":false},{"id":"qgis:geo_batiment__fb80d800-e739-11ec-b344-53cae45d456f","format":"image/png","group":"Default","search":{"url":"https://georchestra.geo-solutions.it/geoserver/wfs","type":"wfs"},"name":"qgis:geo_batiment","opacity":1,"description":"geo_batiment","title":"geo_batiment","type":"wms","url":"/geoserver/ows","bbox":{"crs":"EPSG:4326","bounds":{"minx":"-1.7562151836820208","miny":"48.073997955899934","maxx":"-1.5478527277155643","maxy":"48.16097742408042"}},"visibility":true,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"catalogURL":null,"useForElevation":false,"hidden":false,"version":"1.3.0","params":{}}],"groups":[{"id":"Default","title":"Default","expanded":true}],"backgrounds":[],"bookmark_search_config":{}},"catalogServices":{"services":{"localgs":{"url":"/geoserver/ows","type":"wms","title":"le geoserver local","autoload":true}},"selectedService":"localgs"},"widgetsConfig":{"layouts":{"xxs":[],"md":[]}},"mapInfoConfiguration":{"trigger":"click"},"dimensionData":{},"timelineData":{}}
  • page: ../../#/context/urbanismecadastrapp
  • center: -1.652,48.111
  • zoom: 18

All other parameters are empty.

image

image

@jusabatier
Copy link
Contributor

As I already said in previous issues, this form is too complex to fill for end users.

So I try to implement a simple connector that redirect to mapstore and generate a POST request from simpler parameters.

I tried to POST the request directly to a context (/mapstore/#/context/Test), but it's not working.
Here is the POST request content :

map: {"version":2,"map":{"layers":[{"id":"OSM_DEFAULT_WMTS_GWC","format":"image/jpeg","thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/OSM_Classique.jpg","group":"background","name":"osm:map","description":"OpenStreetMap diffusé par GeoBretagne - Style par defaut","style":"","title":"OpenStreetMap - GeoBretagne","type":"wmts","url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","bbox":{"crs":"EPSG:4326","bounds":{"minx":"-180.0","miny":"-90.0","maxx":"180.0","maxy":"90.0"}},"visibility":false,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"matrixIds":["EPSG:3857"],"tileMatrixSet":true,"requestEncoding":"KVP","dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"queryable":true,"capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","useForElevation":false,"hidden":false,"params":{}},{"id":"OSM_GOOGLE_WMTS_GWC","format":"image/jpeg","thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/OSM_Google.jpg","group":"background","name":"osm:google","description":"OpenStreetMap diffusé par GeoBretagne - Style 'google'","style":"","title":"OpenStreetMap / Google - GeoBretagne","type":"wmts","url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","bbox":{"crs":"EPSG:4326","bounds":{"minx":"-180.0","miny":"-90.0","maxx":"180.0","maxy":"90.0"}},"visibility":false,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"matrixIds":["EPSG:3857"],"tileMatrixSet":true,"requestEncoding":"KVP","dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"queryable":true,"capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","useForElevation":false,"hidden":false,"params":{}},{"id":"RTGE_WMTS_GWC","format":"image/jpeg","thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/RTGE.jpg","group":"background","name":"rasters:rtge","description":"Prise de vue aérienne - Référentiel Très Grande Echelle","style":"","title":"Prise de vue aérienne - RTGE","type":"wmts","url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","bbox":{"crs":"EPSG:4326","bounds":{"minx":"-180.0","miny":"-90.0","maxx":"180.0","maxy":"90.0"}},"visibility":false,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"matrixIds":["EPSG:3857"],"tileMatrixSet":true,"requestEncoding":"KVP","dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"queryable":true,"capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","useForElevation":false,"hidden":false,"params":{}},{"id":"IGN_ORTHO_HR","format":"image/png","thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/RTGE.jpg","group":"background","name":"ign:orthohr","description":"IGN - BD ORTHO HR","title":"BD ORTHO Haute Résolution diffusée par l'IGN","type":"wmts","url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","bbox":{"crs":"EPSG:4326","bounds":{"minx":"2.2656832311486865","miny":"44.73041941408128","maxx":"4.809301780135803","maxy":"46.80610148918325"}},"visibility":true,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"matrixIds":["EPSG:3857"],"tileMatrixSet":true,"requestEncoding":"KVP","dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"queryable":true,"capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","useForElevation":false,"hidden":false,"params":{}},{"id":"PLAN_IGN_WMTS_GWC","format":"image/png","thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/Plan_IGN.jpg","group":"background","name":"ign:plan","description":"Représentation graphique des bases de données IGN. Source : IGN","style":"","title":"Plan IGN","type":"wmts","url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","bbox":{"crs":"EPSG:4326","bounds":{"minx":"-180.0","miny":"-90.0","maxx":"180.0","maxy":"90.0"}},"visibility":false,"singleTile":false,"allowedSRS":{"EPSG:3857":true},"matrixIds":["EPSG:3857"],"tileMatrixSet":true,"requestEncoding":"KVP","dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"queryable":true,"capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts","useForElevation":false,"hidden":false,"params":{}},{"id":"undefined__5","group":"background","source":"ol","title":"Empty Background","type":"empty","singleTile":false,"dimensions":[],"hideLoading":false,"handleClickOnLayer":false,"useForElevation":false,"hidden":false,"visibility":false},{"title":"website:points_de_vente_libelle","name":"website:points_de_vente_libelle","type":"wms","url":"https://geoportail.lepuyenvelay.fr/geoserver/ows","visibility":true}],"center":{"x":432356.5,"y":5628270.98,"crs":"EPSG:3857"},"zoom":18}}

I also tried to add a page attribute to the request and POST it to /mapstore/ :

page: ../../#/context/Test

But it doesn't work anymore.

@jusabatier
Copy link
Contributor

Ok for information to other users, I managed to have it functional.

The good endpoint to POST it is : /mapstore/rest/config/setParams with a page argument added to the map's one if you want to redirect.

I still have one question concerning this localStorage approach : what happen if we load multiple iFrames in the same page ?
I just tested it with 2 iframes on the same page and they doesn't load well, it look like there is a conflict with the use of localStorage.

This localStorage workaround is not working... Why not simply handle a POST request directly to a context URL (ie. /mapstore/#/context/Iframe) ?

@tdipisa
Copy link
Collaborator Author

tdipisa commented Jun 10, 2022

Hi @jusabatier thank you so much for your feedback.

The good endpoint to POST it is : /mapstore/rest/config/setParams with a page argument added to the map's one if you want to redirect.

Yes, good as per documentation here indeed. Thank you so much for clarifying this.

I still have one question concerning this localStorage approach : what happen if we load multiple iFrames in the same page ?
I just tested it with 2 iframes on the same page and they doesn't load well, it look like there is a conflict with the use of localStorage.

Correct if I'm wrong @alexander-fedorenko, but I think if the origin is the same the sessionStorage is shared. That specific use case probably is not supported but it wasn't an implementation requirement either.

This localStorage workaround is not working... Why not simply handle a POST request directly to a context URL (ie. /mapstore/#/context/Iframe) ?

I leave @alexander-fedorenko to answer to this from the tech point of view.

@jusabatier
Copy link
Contributor

To quote your first message in this issue :

Acceptance Criteria
Be able to replace the sviewer

The sviewer allow to open multiple iframe frome a same page.

That specific use case probably is not supported but it wasn't an implementation requirement either.

As sviewer allow it and considering the context that was explained (communication purposes), it was an implementation requirement...

@tdipisa
Copy link
Collaborator Author

tdipisa commented Jun 10, 2022

Correct if I'm wrong @jusabatier, sviewer supports only GET, right?

@jusabatier
Copy link
Contributor

To be able to replace sViewer, the main criteria is the use simplicity.

Your implementation in mapstore is not simple to use as it need to know how to configure mapstore's map that provide a huge amount of attributes.

Just at this point, it's not able to replace the sviewer, rigth ?

We already mention it in another issue with @landryb, prevent that this implementation will overflow URL size limit
From this, your workaround was :

Instead of trying to workaround this issue by shorting up URL with some tricks (e.g. passing only layers and reying on catalogs) I suggest to pass this limitation supporting POST in the back-end.

So the POST support result from a workaround because your implementation doesn't meet the requirements.

In order to move forward, I developed a connector that do the job : https://gitlab.agglo-lepuyenvelay.fr/jusabatier/msiframe
With this we reach the requirements for the simplicity.

But it's just a connector that hide to the end user the cumbersome operation behind.

At this point, your localStorage implementation doesn't handle multiple frame in same page.
It's not related to POST, but to your workaround with localStorage.

I try to find simple solutions to make your implementation meets the requirement, but at this point you'll have to help me...

The simplest way IMO is to handle the POST at the context level (ie. /mapstore/#/context/TheContext).
I don't know if it's possible or if there is some reason that make it not possible.

In both case we need to have GET params as simple as sviewer and the ability to include multiple iframes in same page.

@catmorales
Copy link
Collaborator

catmorales commented Jun 13, 2022

In both case we need to have GET params as simple as sviewer and the ability to include multiple iframes in same page.

Yes I agree with @jusabatier , this functionnality must be easy to use for a data adminstrator and a simple user too. The aim was to replace sviewer as it was specified.
@tdipisa we need to have GET params as simple as sviewer and the ability to include multiple iframes in same page.

@jusabatier
Copy link
Contributor

Do you have any news about this ?
Isn't it possible to simply enable the POST handling directly on the contexts maps as I suggested ?

@tdipisa @alexander-fedorenko @catmorales

@tdipisa
Copy link
Collaborator Author

tdipisa commented Jun 23, 2022

Do you have any news about this ?

Hi @jusabatier, not yet at the moment. As I wrote to @catmorales we will do what possible to meet your request to support multiple iframes but now we need to prioritize issues for group 4. I will provide more feedback as soon as possible.

@jusabatier
Copy link
Contributor

jusabatier commented Aug 22, 2022

Using the map info action (via GET or POST): eg. using the SEARCH:SEARCH_WITH_FILTER action as described in documentation

I use this way, but it doesn't work on layers loaded via the map parameter :

{
    "map":{
        "version":2,
        "map":{
            "layers":[
                {
                    "id":"OSM_DEFAULT_WMTS_GWC",
                    "format":"image/jpeg",
                    "thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/OSM_Classique.jpg",
                    "group":"background",
                    "name":"osm:map",
                    "description":"OpenStreetMap diffusé par GeoBretagne - Style par defaut",
                    "style":"",
                    "title":"OpenStreetMap - GeoBretagne",
                    "type":"wmts",
                    "url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "bbox":{
                        "crs":"EPSG:4326",
                        "bounds":{
                            "minx":"-180.0",
                            "miny":"-90.0",
                            "maxx":"180.0",
                            "maxy":"90.0"
                        }
                    },
                    "visibility":false,
                    "singleTile":false,
                    "allowedSRS":{
                        "EPSG:3857":true
                    },
                    "matrixIds":[
                        "EPSG:3857"
                    ],
                    "tileMatrixSet":true,
                    "requestEncoding":"KVP",
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "queryable":true,
                    "capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "useForElevation":false,
                    "hidden":false,
                    "params":{
                        
                    }
                },
                {
                    "id":"OSM_GOOGLE_WMTS_GWC",
                    "format":"image/jpeg",
                    "thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/OSM_Google.jpg",
                    "group":"background",
                    "name":"osm:google",
                    "description":"OpenStreetMap diffusé par GeoBretagne - Style 'google'",
                    "style":"",
                    "title":"OpenStreetMap / Google - GeoBretagne",
                    "type":"wmts",
                    "url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "bbox":{
                        "crs":"EPSG:4326",
                        "bounds":{
                            "minx":"-180.0",
                            "miny":"-90.0",
                            "maxx":"180.0",
                            "maxy":"90.0"
                        }
                    },
                    "visibility":false,
                    "singleTile":false,
                    "allowedSRS":{
                        "EPSG:3857":true
                    },
                    "matrixIds":[
                        "EPSG:3857"
                    ],
                    "tileMatrixSet":true,
                    "requestEncoding":"KVP",
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "queryable":true,
                    "capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "useForElevation":false,
                    "hidden":false,
                    "params":{
                        
                    }
                },
                {
                    "id":"RTGE_WMTS_GWC",
                    "format":"image/jpeg",
                    "thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/RTGE.jpg",
                    "group":"background",
                    "name":"rasters:rtge",
                    "description":"Prise de vue aérienne - Référentiel Très Grande Echelle",
                    "style":"",
                    "title":"Prise de vue aérienne - RTGE",
                    "type":"wmts",
                    "url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "bbox":{
                        "crs":"EPSG:4326",
                        "bounds":{
                            "minx":"-180.0",
                            "miny":"-90.0",
                            "maxx":"180.0",
                            "maxy":"90.0"
                        }
                    },
                    "visibility":false,
                    "singleTile":false,
                    "allowedSRS":{
                        "EPSG:3857":true
                    },
                    "matrixIds":[
                        "EPSG:3857"
                    ],
                    "tileMatrixSet":true,
                    "requestEncoding":"KVP",
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "queryable":true,
                    "capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "useForElevation":false,
                    "hidden":false,
                    "params":{
                        
                    }
                },
                {
                    "id":"IGN_ORTHO_HR",
                    "format":"image/png",
                    "thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/RTGE.jpg",
                    "group":"background",
                    "name":"ign:orthohr",
                    "description":"IGN - BD ORTHO HR",
                    "title":"BD ORTHO Haute Résolution diffusée par l'IGN",
                    "type":"wmts",
                    "url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "bbox":{
                        "crs":"EPSG:4326",
                        "bounds":{
                            "minx":"2.2656832311486865",
                            "miny":"44.73041941408128",
                            "maxx":"4.809301780135803",
                            "maxy":"46.80610148918325"
                        }
                    },
                    "visibility":true,
                    "singleTile":false,
                    "allowedSRS":{
                        "EPSG:3857":true
                    },
                    "matrixIds":[
                        "EPSG:3857"
                    ],
                    "tileMatrixSet":true,
                    "requestEncoding":"KVP",
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "queryable":true,
                    "capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "useForElevation":false,
                    "hidden":false,
                    "params":{
                        
                    }
                },
                {
                    "id":"PLAN_IGN_WMTS_GWC",
                    "format":"image/png",
                    "thumbURL":"https://geoportail.lepuyenvelay.fr/wp-content/uploads/2021/04/Plan_IGN.jpg",
                    "group":"background",
                    "name":"ign:plan",
                    "description":"Représentation graphique des bases de données IGN. Source : IGN",
                    "style":"",
                    "title":"Plan IGN",
                    "type":"wmts",
                    "url":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "bbox":{
                        "crs":"EPSG:4326",
                        "bounds":{
                            "minx":"-180.0",
                            "miny":"-90.0",
                            "maxx":"180.0",
                            "maxy":"90.0"
                        }
                    },
                    "visibility":false,
                    "singleTile":false,
                    "allowedSRS":{
                        "EPSG:3857":true
                    },
                    "matrixIds":[
                        "EPSG:3857"
                    ],
                    "tileMatrixSet":true,
                    "requestEncoding":"KVP",
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "queryable":true,
                    "capabilitiesURL":"https://geoportail.lepuyenvelay.fr/geowebcache/service/wmts",
                    "useForElevation":false,
                    "hidden":false,
                    "params":{
                        
                    }
                },
                {
                    "id":"undefined__5",
                    "group":"background",
                    "source":"ol",
                    "title":"Empty Background",
                    "type":"empty",
                    "visibility":false,
                    "singleTile":false,
                    "dimensions":[
                        
                    ],
                    "hideLoading":false,
                    "handleClickOnLayer":false,
                    "useForElevation":false,
                    "hidden":false
                },
                {
                    "title":"website:points_de_vente_libelle",
                    "name":"website:points_de_vente_libelle",
                    "type":"wms",
                    "url":"https://geoportail.lepuyenvelay.fr/geoserver/ows",
                    "visibility":true
                }
            ],
            "center":{
                "x":432356.5,
                "y":5628270.98,
                "crs":"EPSG:3857"
            },
            "zoom":11
        }
    },
    "page":"../../#/context/Iframe",
    "actions":[
        {
            "type":"SEARCH:SEARCH_WITH_FILTER",
            "layer":"website:points_de_vente_libelle",
            "cql_filter":"id=15"
        }
    ]
}

Is it a bug ? Is it possible to correct it to have it work with layers loaded via map parameter ?

@tdipisa
Copy link
Collaborator Author

tdipisa commented Aug 31, 2022

Hi @jusabatier I'm sorry for the late reply.

Is it a bug ?

It is how it works know, SEARCH:SEARCH_WITH_FILTER actions can work with layers added through action CATALOG:ADD_LAYERS_FROM_CATALOGS

Is it possible to correct it to have it work with layers loaded via map parameter?

I think yes, but I have to ask developers to have a confirmation. Some development is needed anyway to allow this.

@tdipisa
Copy link
Collaborator Author

tdipisa commented Aug 31, 2022

I'm sorry @jusabatier I think I got confused. I did a quick check to be sure and it should work. Look at my sample. The problem is related to WMTS layers. They are preventing the map to be loaded correctly because at the moment the tileMatrixSet should be in configuration for the given source (see my sample configuration).

@jusabatier
Copy link
Contributor

Well, I investigated a bit more and it appear that I had to send 'action' as a String to setParameters, not as an object.
I correct it and it works without sources as they are already defined in the context.

But I found another bug : if I configure my 'Identifier' plugin with 'showInMapPopup': true the marker is placed on map, but the popup isn't showing.

Can you fix this ?

@tdipisa
Copy link
Collaborator Author

tdipisa commented Oct 5, 2022

New development for requested changes tracked with geosolutions-it/MapStore2#8597 according to the agreed proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants