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

add serverType option to wms & csw catalog entries #8167 #9048

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

landryb
Copy link
Collaborator

@landryb landryb commented Mar 22, 2023

if undefined or set to "geoserver", the behaviour is unchanged. If set to "no-vendor", then TILED query parameter isnt sen't to the remote wms server, and the "tiled" and "localizedLayerStyles" options are hidden in the layer parameters.

more vendor options can be sent/avoided this way. Improves interoperability when displaying and printing layers coming from mapproxy.

closes #7809
closes #7877
closes #7879

Description

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

Issue

What is the current behavior?

#7809, #7877 & #7879

What is the new behavior?
can display and print layers coming from mapproxy, once "no-vendor" is set for the catalog entry.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other useful information

if undefined or set to "geoserver", the behaviour is the unchanged. If set to
"no-vendor", then TILED query parameter isnt sen't to the remote wms server, and
the "tiled" and "localizedLayerStyles" options are hidden in the layer
parameters.

more vendor options can be sent/avoided this way. Improves interoperability
when displaying and printing layers coming from mapproxy.

closes geosolutions-it#7809, geosolutions-it#7877 & geosolutions-it#7879
@landryb
Copy link
Collaborator Author

landryb commented Mar 22, 2023

i see the saveMapConfiguration tests are failing, i think i can fix that.

@tdipisa tdipisa added this to the 2023.01.01 milestone Mar 22, 2023
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Mar 22, 2023
@allyoucanmap
Copy link
Contributor

@landryb I just pushed a commit with the support fot serverType in dashboard so you need to update your local branch

@allyoucanmap
Copy link
Contributor

@landryb I also included the fix mentioned here #8167 (comment)

@allyoucanmap allyoucanmap marked this pull request as ready for review March 23, 2023 10:45
@allyoucanmap
Copy link
Contributor

@landryb if you could confirm that the pending problems has been solved by the new commits then I'm going to do a final review, thanks

@landryb
Copy link
Collaborator Author

landryb commented Mar 23, 2023

i've pulled locally your last commits, and with 986ea75 the serverType selection works for csw catalogs in the map.

I've also added pre-configured no-vendor and geoserver entries to the services array of DashboardEditor plugin config, the value of serverType is properly propagated there, and adding layers from such catalogs shows the correct behaviour (eg TILED sent when serverType is GEOSERVER only), so 5000365 seems to be correct.

but the only thing that isn't working seem to be the serverType selection in a csw catalog in the dashboard editor.
Peek 23-03-2023 13-15

it's as if 986ea75 didnt have any effect for the csw catalogs in the dashboard editor.

@landryb
Copy link
Collaborator Author

landryb commented Mar 23, 2023

i think i understand what weird thing is happening.. the various actions are triggered, but the display isnt updated straight away. I need to make a selection in the tilesize or format entries to have the serverType display updated, and vice-versa.

Peek 23-03-2023 13-31

the same strange behaviour (display being not updated with the just selected options) can be reproduced in the wms catalog entry of the dashboard editor.

and i cant replicated that strange behaviour with the regular csw/wms catalog entries in the map editor.

@allyoucanmap
Copy link
Contributor

@landryb it seems an issue related to the service object not correctly updated, here the fix bdf7c90

@landryb
Copy link
Collaborator Author

landryb commented Mar 23, 2023

@landryb it seems an issue related to the service object not correctly updated, here the fix bdf7c90

thanks, can confirm that with this commit, the broken behaviour in the csw & wms catalog entries advanced properties is fixed in the dashboard editor, changing serverType/tilesize is directly updated in the UI. LGTM!

@allyoucanmap allyoucanmap merged commit 37d8371 into geosolutions-it:master Mar 23, 2023
@allyoucanmap
Copy link
Contributor

@landryb merged, thanks for the contribution!

@allyoucanmap
Copy link
Contributor

@ElenaGallo please test on dev and let us know if we can backport on branch 2023.01.xx

@ElenaGallo
Copy link
Contributor

ElenaGallo commented Mar 24, 2023

Hi @landryb @allyoucanmap

once added cadastre layer from https://tiles.craig.fr/pci/service and ortho layer from https://tiles.craig.fr/ortho/service with NO_VENDOR as Server Type, layers are visible but it is not possible to print them. The following error appears:

Error while generating PDF:
org.mapfish.print.InvalidJsonValueException: spec.layers[1].baseURL has an invalid value: https://tiles.craig.fr/ortho/service ? (Illegal character in scheme name at index 0: https://tiles.craig.fr/ortho/service ?)
at org.mapfish.print.map.readers.HTTPMapReader.(HTTPMapReader.java:74)
at org.mapfish.print.map.readers.TileableMapReader.(TileableMapReader.java:42)
at org.mapfish.print.map.readers.WMSMapReader.(WMSMapReader.java:98)
at org.mapfish.print.map.readers.WMSMapReader.(WMSMapReader.java:46)
at org.mapfish.print.map.readers.WMSMapReader$Factory.create(WMSMapReader.java:84)
at org.mapfish.print.map.readers.MapReaderFactoryFinder.create(MapReaderFactoryFinder.java:36)
at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:120)
at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)
at org.mapfish.print.config.layout.MapBlock$1.render(MapBlock.java:77)
at org.mapfish.print.PDFCustomBlocks.addAbsoluteDrawer(PDFCustomBlocks.java:187)
at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:73)
at org.mapfish.print.config.layout.Page.render(Page.java:80)
at org.mapfish.print.config.layout.Layout.render(Layout.java:64)
at org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:31)

How to Reproduce

  • Open this map
  • Follow the steps in the video below:
print.mov

@landryb
Copy link
Collaborator Author

landryb commented Mar 24, 2023

hi @ElenaGallo , the map link you gave requires login and i havent been able to login with either admin/admin or user/user. In your video i see the STR, but can't see what's the wrong request done by the print module.

i've tried reproducing your map (gzipped & attached below), adding two wms layers from mapproxy, and here it correctly generates a pdf preview.
test-print-mapproxy.json.gz

@landryb
Copy link
Collaborator Author

landryb commented Mar 24, 2023

@landryb
Copy link
Collaborator Author

landryb commented Mar 24, 2023

wild guess from the error message, would there be an extra space between service and ? in the POST data sent in your map ?

@ElenaGallo
Copy link
Contributor

@landryb sorry, now the map is public. In any case, now I can print and everything works as it should. Thanks

@ElenaGallo
Copy link
Contributor

@allyoucanmap the rest passed on DEV, @landryb please backport to 2023.01.xx. Thanks

allyoucanmap added a commit to allyoucanmap/MapStore2 that referenced this pull request Mar 29, 2023
…ies (geosolutions-it#9048)

 geosolutions-it#7809 failure to print WMS layers coming from mapproxy
 geosolutions-it#7877 set TILED=true only when printing layers from geoserver
 geosolutions-it#7879 set TILED=true only when loading layers from geoserver
---------

Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com>
@allyoucanmap allyoucanmap removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Mar 29, 2023
tdipisa pushed a commit that referenced this pull request Mar 29, 2023
…g entries (#9048) (#9063)

* #8167 add serverType option to wms & csw catalog entries (#9048)

 #7809 failure to print WMS layers coming from mapproxy
 #7877 set TILED=true only when printing layers from geoserver
 #7879 set TILED=true only when loading layers from geoserver
---------

Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com>

* #8905 Add missing translations (#9055)

* #8905 Add missing translations

* fix failing tests

---------

Co-authored-by: Landry Breuil <landryb@users.noreply.github.com>
@tdipisa tdipisa mentioned this pull request Mar 7, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants