Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple Leaflet example for Protomaps with custom bbox

License

NotificationsYou must be signed in to change notification settings

do-me/protomaps-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Leaflet example for Protomaps with custom bbox.

Tutorial

1 Download a pmtiles file

Either get a world file or use a bounding box.

World:

Area of interest:

  • Search your bbox fromhttp://bboxfinder.com/ and copy the values from bbox (not from the url as lat lon is switched!) e.g.11.532383,48.106973,11.619759,48.162650
  • download the latest pmtiles binary fromhttps://github.com/protomaps/go-pmtiles/releases and run the command, e.g. this for Munich:./pmtiles extract https://build.protomaps.com/20240812.pmtiles munich.pmtiles --bbox=11.532383,48.106973,11.619759,48.162650

2 Set up a minimal Leaflet web app

Downloadindex.html and change the pmtiles filename if needed.

3 Run a simple webserver

Make sure that the index.html & your_area.pmtiles file is saved in the same directory. E.g.

  • in VS Code simply run the webserver plugin for port 5500 and go tohttp://localhost:5500/
  • using npx:npx serve
  • using python:python -m http.server

You will now see a nicely rendered background map for your area of interest or the world.

About

Simple Leaflet example for Protomaps with custom bbox

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp