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

Use custom params from url GEO-2777 #986

Merged
merged 5 commits into from
Jan 14, 2020

Conversation

marionb
Copy link
Contributor

@marionb marionb commented Jan 13, 2020

This replaces #985

Addresses https://jira.camptocamp.com/browse/GEO-2777
Adds a parameter to get all the config params from a URL and add them in the print request for that map.
Custom parameters need to be specified in a list in the config.

This is implemented for the base maps requested in the restriction on landownership

TO TEST:

  • Add a parameter in the config.yaml.make
    • Ideally you add a parameter that is not already added standard wise and
    • witch exists in the URL (i.e BBOX).
  • The parameter should sow in the getspec under customParams
  • If nothing is specified the the parameter TRANSPARENT will appear in the customParams as in master.

Copy link
Member

@jwkaltz jwkaltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and tested successfully on dummy database

# If this is not configured the wms_url_params will be used.
# wms_url_keep_params:
# - param1
# - param2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

@staticmethod
def string_check(value):
"""
Check if the value given is a string. It it is not jon the values using comma separator.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typos in the second sentence:
If it is not, assume it is a list and join the values using comma separator.

Copy link
Contributor

@ger-benjamin ger-benjamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review (after jwkaltz), not tested.
It looks okay


:return: The configured wms_url_params.
:rtype: list
:rtype: dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it sjhould be something like the return doc in your new get_custom_wms_params function.

@marionb marionb force-pushed the NEW-use-customParams-from-URL-GEO-2777 branch from 99faf67 to 9e64fcb Compare January 13, 2020 15:14
@pfirpfel
Copy link
Contributor

Codacy Here is an overview of what got changed by this pull request:

Clones removed
==============
+ pyramid_oereb/contrib/print_proxy/mapfish_print.py  -2
         

See the complete overview on Codacy

@marionb marionb merged commit 336b6f3 into master Jan 14, 2020
@marionb marionb deleted the NEW-use-customParams-from-URL-GEO-2777 branch January 14, 2020 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants