Skip to content

add path: to /collection_id for /map#2294

Merged
tomkralidis merged 1 commit intogeopython:masterfrom
cgs-earth:addPathToMapCollectionId
Mar 24, 2026
Merged

add path: to /collection_id for /map#2294
tomkralidis merged 1 commit intogeopython:masterfrom
cgs-earth:addPathToMapCollectionId

Conversation

@C-Loftus
Copy link
Copy Markdown
Contributor

Overview

Most flask endpoints in pygeoapi use <path:collection_id> to allow for nested collection names like my_map/elevation vs my_map/land_use.

For instance
@BLUEPRINT.route('/collections/<path:collection_id>/position')

However for /map this didn't appear to be present

As such, if you change the default WMS provider to have a / then it will break, for instance like this.

    mapserver_world_map/test:
        type: collection
        title: MapServer demo WMS world map
        description: MapServer demo WMS world map
image

However, if I add the path fix then it will load fine and allow collection names with /

image

I have changed this to add the path since I presume this was missing unless I am missing something about the internal workings of the WMS provider.

Related Issue / discussion

Discussed offline with @webb-ben

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@tomkralidis tomkralidis added the OGC API - Maps OGC API - Maps label Mar 24, 2026
@tomkralidis tomkralidis added this to the 0.24.0 milestone Mar 24, 2026
@tomkralidis tomkralidis self-requested a review March 24, 2026 19:14
@tomkralidis tomkralidis merged commit 03203c8 into geopython:master Mar 24, 2026
3 checks passed
@C-Loftus C-Loftus deleted the addPathToMapCollectionId branch March 24, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OGC API - Maps OGC API - Maps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants