maplibre-pmtiles-patterns

Package vector and raster tiles into a single PMTiles file for MapLibre.

131|8|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/maplibre/maplibre-agent-skills --skill maplibre-pmtiles-patterns-maplibre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maplibre-pmtiles-patterns
Source: https://github.com/maplibre/maplibre-agent-skills/tree/main/skills/maplibre-pmtiles-patterns
Command: npx skills add https://github.com/maplibre/maplibre-agent-skills --skill maplibre-pmtiles-patterns-maplibre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PMTiles enables serverless hosting of map tiles by packaging vector or raster data into a single file that can be served from static storage, eliminating the need for a traditional tile server when using MapLibre GL JS.

Core Features & Use Cases

  • Static hosting: publish one or more .pmtiles files on S3, Cloudflare R2, GitHub Pages, or any static host that supports HTTP Range requests.
  • Protocol integration: leverage the PMTiles protocol in MapLibre GL JS to load tiles from a pmtiles:// URL or a https URL pointing to a .pmtiles file.
  • Generation options: create PMTiles from MBTiles with the PMTiles CLI or generate directly from source data using tools like Planetiler, tippecanoe, or GDAL.
  • Formats supported: work with vector, raster, and raster-dem tiles, including terrain with terrarium encoding.

Quick Start

Drop a .pmtiles file onto a static hosting service and reference it in your MapLibre style with a pmtiles:// URL.

Frequently Asked Questions about maplibre-pmtiles-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I host map tiles serverlessly for MapLibre without running a tile server?

PMTiles packages vector or raster tiles into a single file for serverless MapLibre hosting. You drop the .pmtiles file onto static storage like S3, R2, or GitHub Pages and reference it using a pmtiles:// URL in your style.

Can I generate PMTiles directly from source data using tippecanoe or Planetiler?

Yes, you can generate PMTiles directly from source data using tools like Planetiler, tippecanoe, or GDAL. Alternatively, the PMTiles CLI converts existing MBTiles files into the PMTiles format for static hosting.

Does static hosting for PMTiles require specific HTTP or CORS configurations?

Static hosting for PMTiles requires HTTP Range request support and proper CORS headers. Any static host meeting these requirements, such as Cloudflare R2 or S3, can serve the tiles to MapLibre GL JS.

What tile formats are supported when using PMTiles with MapLibre?

PMTiles supports vector, raster, and raster-dem tiles, including terrain data with terrarium encoding. This allows MapLibre GL JS to load various map layers from a single statically hosted file.

How do I load a PMTiles file into a MapLibre style?

You load PMTiles into MapLibre by integrating the pmtiles protocol and referencing your file with a pmtiles:// URL or an HTTPS URL pointing to the .pmtiles file within your MapLibre style configuration.

Why use PMTiles instead of a traditional tile server for MapLibre?

PMTiles eliminates the need for a traditional tile server by packaging all tiles into a single file. This approach enables serverless hosting on static platforms, drastically simplifying deployment and reducing infrastructure costs.