Adapting d3.geo.tile to show Mapzen vector tiles
Clone or download
Pull request Compare This branch is 90 commits ahead of hkrishna:gh-pages.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
d3.geo.tile.v0.min.js
d3.v3.min.js
geojson.html
index.html
scripts.js
styles.css
topojson.html

README.md

d3-vector-tiles

Adapting d3.geo.tile to show Mapzen vector tiles

Live demo: http://mapzen.github.io/d3-vector-tiles

d3-vector-tiles-demo screenshot

Demos

There are three demos, one per vector tile format.

Recommended pairings

  • D3 works best with TopoJSON tiles
  • Tangram JS works best with TopoJSON tiles
  • Tangram ES works best with MVT tiles
  • Mapbox Studio works best with MVT tiles

Format pros & cons

  • TopoJSON tiles have comparable file size to MVT (they are compressed during server-client requests) and is better for JS based web development.
  • MVT offers smallest absolute file size in a binary format ideally suited for mobile applications (fastest processing time in native code, slower processing time in web browsers), but hard to debug.
  • GeoJSON is useful for debugging as it's more human readable than the other formats (not recommended for production).

To run locally:

Download this repo, then start a web server in its directory:

python -m SimpleHTTPServer 8000

If that doesn't work, try:

python -m http.server 8000

Then navigate to: http://localhost:8000