1.0.2 • Published 10 years ago

level-map-tiles v1.0.2

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

level-map-tiles

Fetch map tiles and store them in level-js, for offline maps in the browser.

example

var leveljs = require('level-js')
var db = require('levelup')('maps', {db: leveljs})

//I am using bing maps because they set the CORS header to * !
var getMapTileUrl = require('map-tile-url').bing

db = require('./')(db, getMapTileUrl)

//a map of the world...
document.body.appendChild(db.getTile(0,0,1))
document.body.appendChild(db.getTile(1,0,1))
document.body.appendChild(db.getTile(0,1,1))
document.body.appendChild(db.getTile(1,1,1))

use with mokuai and you can probably get leaflet

License

MIT