level-map-tile

1.0.0 • Public • Published

level-map-tile

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

/level-map-tile/

    Package Sidebar

    Install

    npm i level-map-tile

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • nopersonsmodules