georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

Integrate msIframe connector #549

Closed jusabatier closed 1 year ago

jusabatier commented 2 years ago

Following https://github.com/georchestra/mapstore2-georchestra/issues/476

As explained in our last call, I think this still the better alternative.

The API documentation is available here : https://gitlab.agglo-lepuyenvelay.fr/jusabatier/msiframe/-/blob/master/README.md

This way it's only added to the Georchestra's version as you said me that you don't want maintain it for Mapstore.

I still have some questions :

When I tested, I redirect to it but it always redirect to : /mapstore/#/viewer/openlayers/config?queryParamsID=### even if I provide a page parameter.

Edit : I investigated and found out that it may be due to my environment log level (DEBUG). In Spring 5.1, 5.2 and probably 5.3 (the MS version), request logs can flush the request content for form-urlencoded content types and so the controller can't get it. (cf. https://github.com/spring-projects/spring-framework/issues/22985) I will test Monday with WARN logging level and it may correct this bug.

jusabatier commented 2 years ago

Some explanations on what I add in this PR :

It add a /mapstore/msiframe/ endpoint (controller+servlet).

It's possible to define a default mapstore's context to use via msIframe.defaultContext in mapstore.properties, if none is defined as default or in request params, it redirect to /mapstore/#/.

A jsp which is returned by the controller containing the following javascript algorithm :

jusabatier commented 2 years ago

I tested this morning to use WARN for debug level instead of DEBUG, and everything works fine.

So the bug with logger flushing the request param when they're form-urlencoded is still present in the MS2's spring version. (cf. https://github.com/spring-projects/spring-framework/issues/22985)

So this connector is fully working.

Any feedbacks @tdipisa @MaelREBOUX @catmorales @landryb ?

Once it will be merged, I wonder were can I push some documentation for it ? Currently the README.ms refer to https://docs.georchestra.geo-solutions.it/en/latest/, but it doesn't look to be the same as the docs folder of the project.

jusabatier commented 2 years ago

Example URL : https://geoportail.lepuyenvelay.fr/mapstore/msiframe/?c=Iframe&x=432356.50&y=5628270.98&z=11&lb=1&layers=website:points_de_vente_libelle&s=website:points_de_vente_libelle*id%3D15

jusabatier commented 2 years ago

@tdipisa Can this PR be merged soon ?

Curently I have to use a fork and recompile MS to embed it.

jusabatier commented 1 year ago

@tdipisa Sorry to ask again, but when this PR can be merged ?

Do you expect me to do anything for this before merging ?

jusabatier commented 1 year ago

As already explained, IMO this alternative is simpler than the one you implemented because it's closer to sviewer params.

What I understand during our discussions is that I have the responsability to maintain this implementation because it's wil just be an overlay for mapstore2-georchestra and this isn't your code, but both will be included.

Some feedbacks about this @landryb @MaelREBOUX @catmorales ?

landryb commented 1 year ago

i'm pretty sure what was agreed by everyone in the last meeting was: