npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

level-map-tiles

1.0.2

@dominictarr

npmHomeRepoSnykSocket
Downloads:5
$ npm install level-map-tiles
DailyWeeklyMonthlyYearly

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