Skip to content

Conversation

@migurski
Copy link
Contributor

@migurski migurski commented Dec 21, 2025

Introduces examples/local.html, distinct from other examples by using generated output of styles and tiles to serve a map. Meant for users of Basemaps repo who intend to build their Styles & Tiles and need a way to see those results in a simple browser shell to copy/paste into their own sites or apps.

Distinct from /app by not introducing a server component, showing how static resources alone can define a useable map.

To use local font and sprite files from basemap-assets, we include a new submodule.

Example sequence to generate and display in a browser:

cd tiles
docker build -t protomaps/basemaps .
docker run -v ./data:/tiles/data --rm -it protomaps/basemaps --output=data/monaco.pmtiles --area=monaco --force
cd -

cd styles
npm run generate_style style.json https://example.com/tilejson.json light en
cd -

git submodule init
git submodule update

open http://localhost:8080/examples/local.html
npx http-server -p 8080 -c-1

Result:

Screenshot 2025-12-21 at 12 11 08 PM

@migurski migurski force-pushed the migurski/init-starter-template branch from ca9e805 to 748ed9a Compare December 21, 2025 18:36
@migurski migurski force-pushed the migurski/init-starter-template branch from ce10073 to 6097b6c Compare December 21, 2025 20:08
@sonarqubecloud
Copy link

@migurski migurski requested a review from bdon December 22, 2025 19:27
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.

2 participants