level-map-tiles

1.0.2 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    1

Package Sidebar

Install

npm i level-map-tiles

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • dominictarr
  • nopersonsmodules