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.

Uses local font and sprite files downloaded from protomaps/basemaps-assets.

Example sequence to generate and display in a browser:

cd tiles
mvn clean package -DskipTests
java -jar target/*-with-deps.jar --download --area=monaco --force
cd -

cd styles
npm run generate_style style.json https://example.com/tilejson.json light en \
  'http://localhost:8080/basemaps-assets/sprites/v4/light' \
  'http://localhost:8080/basemaps-assets/fonts/{fontstack}/{range}.pbf'
cd -

curl -L https://github.com/protomaps/basemaps-assets/archive/refs/heads/main.zip -o /tmp/basemaps-assets-main.zip
unzip /tmp/basemaps-assets-main.zip 'basemaps-assets-main/fonts/*' 'basemaps-assets-main/sprites/*' -d /tmp
mv /tmp/basemaps-assets-main basemaps-assets

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
@migurski migurski requested a review from bdon December 22, 2025 19:27
@migurski migurski marked this pull request as ready for review January 3, 2026 00:27
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 3, 2026

@migurski migurski requested a review from bdon January 3, 2026 01:51
@bdon bdon merged commit c9ee911 into protomaps:main Jan 5, 2026
6 checks passed
@migurski migurski deleted the migurski/init-starter-template branch January 5, 2026 18:51
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