This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) + ',' + |