Testing martin with MapLibre from a pbf file #1233
-
Hi guys, My goal is to replace Google Maps with a self-hosted solution. I'm a total newbie in GIS so it's a bit challenging ... https://github.com/BigBoulard/martin-test Here is what I did so far: 1. Frontend Test Page with a minimal
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There were several issues.
docker run -e JAVA_TOOL_OPTIONS="-Xmx1g" -v "$(pwd)/planetiler":/data ghcr.io/onthegomap/planetiler:latest --download --area=belgium see planetiler version: '3.8'
services:
martin:
image: ghcr.io/maplibre/martin:v0.13.0
ports:
- 3000:3000
environment:
- RUST_LOG=debug
volumes:
- ./fonts:/fonts
- ./icons:/sprite
- ./maps-data/belgium.mbtiles:/maps-data/belgium.mbtiles
command: /maps-data/belgium.mbtiles --sprite /sprite --font /fonts
"osmtiles": {
"type": "vector",
"tiles": ["http://0.0.0.0:3000/belgium/{z}/{x}/{y}"],
"minzoom": 0,
"maxzoom": 22
} Now the map displays smoothly. I just noticed in the JS Console that if I zoom in too much, I get warnings about missing icons in the sprite, this is a known issue in the osm bright style ...
Image "bicycle_parking_11" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.
Image "doctors_11" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.
... |
Beta Was this translation helpful? Give feedback.
There were several issues.
Planetiler
which produces ambtiles
file that Martin can use as a source to serve.see planetiler