Skip to content

Add support for loading local XYZ tiles#2

Merged
rudokemper merged 1 commit into
mainfrom
xyz-tiles
Jan 23, 2024
Merged

Add support for loading local XYZ tiles#2
rudokemper merged 1 commit into
mainfrom
xyz-tiles

Conversation

@rudokemper
Copy link
Copy Markdown
Member

Goal

This PR makes it possible for mbgl-tile-renderer to load local XYZ tiles in addition to MBTiles and GeojSON sources.

What I changed

  • Added a fixture with sample raster XYZ tiles and style defining these tiles as a source.
  • Added a function getLocalXYZTile to handle the request for XYZ tiles (raster or vector).
  • Added a var isXYZDirURL to validate if an incoming request URL is in XYZ format (on the basis of containing /number/number/number), and if so, call the getLocalXYZTile function.

@rudokemper rudokemper merged commit df22be6 into main Jan 23, 2024
@rudokemper rudokemper deleted the xyz-tiles branch January 23, 2024 15:57
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.

1 participant