PMTiles 🗺

PMTiles

Open Beta
.pmtiles · application/vnd.pmtiles

PMTiles 是面向 Web 地图的无服务器矢量瓦片归档格式。单个文件包含所有瓦片,可通过 HTTP 范围请求访问。非常适合托管在 S3、CloudFlare R2、GitHub Pages 上,无需瓦片服务器。

立即导出 PMTiles ✨ Open Beta — 免费无限制

主要特点

单一文件——全部瓦片
HTTP 范围请求
无需服务器——仅需静态托管
PMTiles 格式导出示例(莫斯科中心,1x0.5 公里)
示例:莫斯科中心区,约 1x0.5 公里,中等详细度

关于 PMTiles 格式

PMTiles is an archive format in which a whole set of tiles sits in one file with an internal index. The browser does not download it as a whole: it requests the pieces it needs with HTTP range requests, which any static hosting can serve — S3, Cloudflare R2, GitHub Pages, plain Nginx.

Hence the main benefit: the map works without a tile server. There is no service to set up, watch over and pay for — the file simply sits next to the site. For a prototype, an internal dashboard or a project that has to outlive the shutdown of a third-party map service, that makes life noticeably easier.

Inside the archive are MVT vector tiles, that is geometry with attributes, and the appearance is set by a style on the client side. The export builds the pyramid up to zoom 12: beyond that encoding the tiles becomes too expensive, and if you asked for more, we honestly report the limitation and suggest MBTiles. For the same reason the exporter rejects very dense areas straight away rather than after a long wait: a short, clear refusal is better than a stuck job.

打开 PMTiles 文件的程序

以下程序可以打开、编辑和处理从 OSM2CDR 导出的 PMTiles(.pmtiles)文件:

💻MapLibre GL JS 💻Leaflet 💻PMTiles Viewer 🌎QGIS 💻Felt

格式规格

谁在使用 PMTiles 地图

🏗
无服务器网页地图
A web map with no tile server: one file on hosting, no service to maintain.
💻
静态瓦片托管
Serving tiles from static storage — S3, Cloudflare R2 or GitHub Pages hand the file over as an ordinary resource.
📊
CDN 地图
A map through a CDN: it is cached as a whole, while the client fetches only the pieces it needs.
🎨
离线网页地图
A self-contained web map that can be placed next to the application and opened without external services.
🗺
原型开发
A quick prototype: the map is up in minutes, with no infrastructure and no contracts with tile providers.

如何导出 PMTiles

1
选择区域
在 osm2cdr 的交互式地图上绘制矩形或多边形
2
选择 PMTiles
从 127 种可用导出格式中选择 PMTiles
3
导出
点击导出,1–5 分钟内收到您的 .pmtiles 文件
4
下载
下载完成的 PMTiles 文件并在 MapLibre GL JS 中打开

导出后如何打开

PMTiles 格式的热门地图

Free

导出 PMTiles 地图

从 OpenStreetMap 下载专业的 PMTiles 地图。即时生成,任意区域。

免费 / 导出
立即导出 PMTiles →

常见问题

PMTiles 需要瓦片服务器吗?
哪些库支持 PMTiles?
Up to which zoom is the pyramid built?
Why was the export refused for a large dense area?
Why is the map empty after I connect it?

与其他格式比较

相关格式

经常一起导出

Related Articles