Skip to content

feat(tms): Add TMS layer support with SRS parameter#33

Draft
fgravin wants to merge 2 commits intomainfrom
tms
Draft

feat(tms): Add TMS layer support with SRS parameter#33
fgravin wants to merge 2 commits intomainfrom
tms

Conversation

@fgravin
Copy link
Member

@fgravin fgravin commented Dec 18, 2025

Summary

  • Add createXyzFromTms utility function to create XYZ layers from TMS endpoints
  • Update ogc-client to latest dev version for TMS endpoint support

Changes

  • New utility: createXyzFromTms(tmsUrl, tileMapName, srs) in packages/core/lib/utils/tms.ts
    • Fetches TMS endpoint metadata
    • Filters tile maps by title and SRS
    • Generates correct XYZ URL pattern with proper tile format extension
    • Handles error cases (missing tile maps, missing tile sets)
  • Tests: Comprehensive test coverage in packages/core/lib/utils/tms.test.ts
    • PNG and JPEG tile format support
    • Error handling for non-existent tile maps
    • Mock TmsEndpoint implementation
  • Dependencies: Updated @camptocamp/ogc-client to latest dev version

Does not work !
URLs to test

image

🤖 Generated with Claude Code
🤗 Reviewed by a Human

@fgravin fgravin marked this pull request as draft December 18, 2025 15:03
@jahow
Copy link
Member

jahow commented Jan 5, 2026

I think the logic is too simple here; we also need to take the bounding box of the tile matrix into account, there's no guarantee that the tiles will actually align on the global "classical" web mercator tile grid

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