Skip to content

Instantly share code, notes, and snippets.

map.on('moveend', function() {
updateMapLayer();
});
var dataBounds, zoom, dataUrl, dataType;
function updateMapLayer() {
// W, S, E, N
dataBounds = map.getBounds().getWest().toFixed(5) + ',' +
map.getBounds().getSouth().toFixed(5) + ',' +
map.getBounds().getEast().toFixed(5) + ',' +
@spatialhast
spatialhast / gist:63677e0f0584a043caf3
Created February 24, 2015 09:33
UTGGrid & Vector Tiles
Simple command line script to create UTFGrid json files from a polygon shapefile.
https://github.com/Ecotrust/create-utfgrids
Mapnik
# sudo apt-get install python-software-properties
# sudo add-apt-repository ppa:mapnik/nightly-2.3
# sudo apt-get update
# sudo apt-get install libmapnik libmapnik-dev mapnik-utils python-mapnik
Python OGR