npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@openhistoricalmap/map-styles

v0.9.12

Published

A collection of map styles for OpenHistoricalMap

Readme

OpenHistoricalMap styles

This repository contains vector map styles that can be applied to OpenHistoricalMap vector tiles. There are a number of uses for these styles but common to them is the OpenHistoricalMap vector tile source: https://vtiles.openhistoricalmap.org/.

CDN usage with MapLibre GL JS

The MapLibre GL JS quickstart has you create an html file containing:

<html>
<head>
  <script src="https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js"></script>
  <link href="https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.css" rel="stylesheet" />
</head>
<body>
<div id="map" style="width:100%;height:100%"></div>
<script>
  var map = new maplibregl.Map({
    container: 'map', // container id
    style: 'https://demotiles.maplibre.org/style.json', // style URL
    center: [0, 0], // starting position [lng, lat]
    zoom: 1 // starting zoom
  });
</script>

</body>
</html>

To use one of the OpenHistoricalMap styles simply replace the style URL, https://demotiles.maplibre.org/style.json with one of ours:

| Style | URL | | --- | --- | | historical | https://unpkg.com/@openhistoricalmap/map-styles@latest/dist/historical/historical.json | | japanese_scroll | https://unpkg.com/@openhistoricalmap/map-styles@latest/dist/japanese_scroll/japanese_scroll.json | | railway | https://unpkg.com/@openhistoricalmap/map-styles@latest/dist/railway/railway.json | | woodblock | https://unpkg.com/@openhistoricalmap/map-styles@latest/dist/woodblock/woodblock.json |

Instead of specifying latest you can also pin your style to a particular version, e.g., 0.9.6

Style development using Maputnik

We use the hosted version of the Maputnik visual editor for style development although a local installation should work equally well. The recommended way to work with Maputnik is to:

  1. clone this repo to your computer or download the latest release. git clone [email protected]:OpenHistoricalMap/map-styles.git
  2. run npm install from the root directory.
  3. run npm run start in the root directory; this will start browsersync and open a new tab or window in your browser. Everything except for the OHM vector tile sources (style files, glyphs, sprites) will be running locally on port 8888.
  4. open the style file you wish to work on in Maputnik.; it will be historical/historical.json or an equivalent path for a different style.
  5. if you're submitting changes to OpenHistoricalMap please begin by creating an issue that describes them at our issues repository, which is different from where you'd submit your pull request.
  6. when you're satisfied with your local changes, repopulate the dist directory by running npm run build; the build step replaces references to localhost with the production values of the OpenHistoricalMap servers for glyph and sprite serving; this is required prior to deploying to OHM's staging and production servers. If you're hosting your own fonts or icons you'll need to edit these for your custom use.
  7. use control-c to end the browser session you started with npm run start.

Miscellaneous notes:

  • we use nvm and provide an .nvmrc file. If you use it, remember to begin your development with nvm use.
  • although this repository contains glyphs for many fonts, the build step only packages the styles in use across all styles.
  • If you're creating a new style, please follow our naming conventions where, for a new_style, the expected file hierarchy is:
    /new_style/new_style.json
    /new_style/new_style_spritesheet.json
    /new_style/new_style_spritesheet.png
    /new_style/[email protected]
    /new_style/[email protected]
  • the OpenHistoricalMap timeslider is not yet incorporated; it, too, is being readied for npm packaging.
  • we recognize that it would be better if the local port number were configurable at the command line.

Versioning and publishing to npm

  1. increment the version in package.json, e.g., 0.9.7
  2. commit your style changes, including /dist/* & package.json, push to GitHub, and create a corresponding release, e.g., v0.9.7
  3. publish to npm using npm publish
  4. rebuild the OHM properties that depend on map-styles, making sure the latest version of the module has been pulled.

ohm-website

  1. ensure your local staging branch of ohm-website is current using git pull
  2. create a release branch from staging, e.g., git checkout -b map-styles-0.9.7
  3. log in to the Docker container and start a bash shell
  4. run yarn upgrade and verify, using the output, that the correct version has been installed. Note that the map-styles version is specified with the ^ operator so that our package.json will need to be updated for a major version release, e.g., to 1.x from 0.9.x
    Rebuilding all packages...
    success Saved lockfile.
    success Saved 159 new dependencies.
    info Direct dependencies
    ├─ @mapbox/[email protected]
    ├─ @maplibre/[email protected]
    ├─ @openhistoricalmap/[email protected]
  5. from your IDE/host computer, commit yarn.lock and push your branch to GitHub
  6. open a pull request against OpenHistoricalMap/ohm-website's staging branch
  7. confirm that the only changed file is yarn.lock & merge to staging
  8. pull the updated staging branch to get the merge commit
  9. ensure your local staging branch of ohm-deploy is current using git pull
  10. create a release branch from staging, e.g., git checkout -b map-styles-0.9.7
  11. in images/web/Dockerfile update OPENHISTORICALMAP_WEBSITE_GITSHA
  12. commit the Dockerfile and push your branch to GitHub
  13. open a pull request against OpenHistoricalMap/ohm-deploy's staging branch
  14. confirm your changed files & merge to staging
  15. monitor the build output

Review styles while they are in staging

To review the styles with the latest updates to the map-styles repo before they are live, use the below links. These are pulled from the staging branch. The staging branch will reflect 1) recently made updates before they are merged into main and occasionally 2) iterative cartography testing.

To see a specific year in history, change the target year in the URL:

  • Main/Historical: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=O_staging
  • Rail style: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=R_staging
  • Woodblock: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=W_staging
  • Japanese Scroll: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=J_staging