Skip to content

saranrapjs/no-highways

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NYC (& the World) Without Highways

Ths is the code counterpart to the map and webpage of the same name, which allows anyone to easily create a highway-less map with tangram.

Usage

This isn't yet packaged as an fully-fledged npm module, but you should be able to import like so:

{
  "name": "my-app",
  "dependencies": {
    "no-highways": "saranrapjs/no-highways",
  }
}

And use in requirejs-y code like so:

var scene = require('no-highways');
var map = L.map('map', {
  center: [40.679625, -74.003938],
  zoom: 16,
  maxZoom: 20,
});
var tangramLayer = Tangram.leafletLayer({
  scene: L.NoHighways('replace-this-with-your-nextzen-api-key'),
}).addTo(map)

I've also included a standalone demo.html, which requires replacing replace-this-with-your-nextzen-api-key with a free Nextzen API key.

Some notes on tagging

As it stands, my goal is to have this map filter out any OSM tag that corresponds to a road that can't reasonably be walked on or over, but OSM tags aren't always consistent. As such there are some highway types drawn by the Walkabout styles that may look highway-ish, but practically are not. By way of example: we exclude highway="trunk", but keep highway="primary". The road I've been using as my guiding star here is Flatbush Ave., in Brooklyn — it's tagged primary, but has pedestrian crossings. I'd be open to a more detailed criteria (maximum number of lanes?) if it seemed reasonable. Feel free to make a pull request!

About

NYC (& the World) Without Highways

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published