Skip to content

feat: generate a map configuration based on a wms - #20

Open
nicokant wants to merge 3 commits into
mainfrom
mapproxy
Open

feat: generate a map configuration based on a wms#20
nicokant wants to merge 3 commits into
mainfrom
mapproxy

Conversation

@nicokant

@nicokant nicokant commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@nicokant
nicokant marked this pull request as draft January 9, 2026 12:12
@nicokant
nicokant requested a review from frafra January 9, 2026 12:12
@nicokant
nicokant marked this pull request as ready for review January 9, 2026 12:24

@frafra frafra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be useful to have the centering and zoom level computed automatically.

Comment thread src/datasync/maps.py
"icon": "https://s3-ext-1.nina.no/dms/maps/logosmall-BFfoJdyr.png",
"baseMap": "positron",
"layerOrder": [],
# TODO: make this configurable or automatic based on the resource

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be automatically computed? mercantile did that, but it looks unmaintained. It might be possible to use morecantile, to get the minimum zoom level required to show the entire bbox, using https://developmentseed.org/morecantile/api/morecantile/models/#morecantile.models.TileMatrixSet.zoom_for_res

Comment thread src/datasync/maps.py
req = getattr(wms, f"_{cn}__build_getmap_request")(
layers=[key],
styles=[""],
srs="EPSG:3857",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's assuming that the server can do EPSG:3857.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants