Skip to content

Instantly share code, notes, and snippets.

View rosskarchner's full-sized avatar
🤘
ROLLBACK_COMPLETE

Ross M Karchner rosskarchner

🤘
ROLLBACK_COMPLETE
View GitHub Profile
$('a[href$=.pdf]').click(function(){
if(pageTracker){
var fixedLink = this.href;
fixedLink = fixedLink.replace(/https?:\/\/(.*)/,"$1");
fixedLink = '/downloads/' + fixedLink;
pageTracker._trackPageview(fixedLink);
if(console){
console.log('page tracked: ' + fixedLink);
}
};
var eightteensixtyOptions = {
getTileUrl: function(coord, zoom) {
return "/1860/tiles-1860/" + zoom +"/" + coord.x+"/"+coord.y+ ".png";
},
tileSize: new google.maps.Size(256, 256),
isPng: true,
maxZoom:14,
minZoom:10,
name:"What",
@rosskarchner
rosskarchner / export.py
Created February 21, 2011 22:48
extract tiles from an mbtiles file
import sqlite3, os
conn = sqlite3.connect('Mills1860.mbtiles')
results=conn.execute('select * from tiles').fetchall()
for result in results:
zoom, column, row, png= result
try:
os.makedirs('%s/%s/' % (zoom, row))