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 🙏

© 2026 – Pkg Stats / Ryan Hefner

open_trails

v1.1.0

Published

package for visualizing trail data from OpenStreetMap

Readme

Open Trail Map

Open Trail Map is a web application to view trails, bike paths and dirt roads in the OpenStreetMap database. It allows a user to search for any location in North America and then select a trail to view distances, elevation stats and an elevation profile.

for further information: http://michaelskaug.com/open_trail_map/

Example

Open Trail Map

Usage

The entry point is index.html. To run the app, start a web server in this repository's directory with, for example:

python -m SimpleHTTPServer

and then navigate to http://localhost:8000/# in a web browser

Dependencies

Open Trail Map is built on Leaflet in addition to some plugins and libraries:

These can be installed individually (if you do this, make sure that index.html points to the correct location for the files) or in one step with npm:

npm install

The following are also required, but they are loaded via a CDN, so they don't need to be installed separately:

Open Trail Map also uses Leaflet.Elevation to display the elevation profiles, but the (modified) code comes packaged with this project.

Map Components

Open Trail Map interacts with several service providers, some of which require a user account and a security key. #####Map tiles Leaflet can load map imagery from many locations with the L.tilelayer() command. For example, I used MapBox:

L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a>, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery &copy <a href="http://mapbox.com">Mapbox</a>',
	maxZoom: 18,
	id:'YOUR_ID',
	accessToken: 'YOUR_TOKEN'
    }).addTo(map);

#####Google Maps API Open Trail Map also uses the Google Maps Javascript API to access geocoding and elevation data. This service requires an account and is loaded in the html:

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=geometry"></script>

To Do

Trail data is now loaded from a dedicated AWS server, rather than the public Overpass API. As a result, response times are much shorter, but it only supplies data for North America because of limited resources. Download times are still quite long, so additional simplification and compression of the trail data on the backend would improve performance.