npm.io
1.0.0 • Published 13 years ago

map-tile-url

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

map-tile-url

get a map tile url, from openstreetmap, google, or bing.

This code is pulled out of cartegan because it is useful on it's own.

var gmt = require('get-map-tile')

var url = gmt(x, y, z)
console.log(url)

providers

gmt.openStreetMap, gmt.google, gmt.bing are supported. openStreetMap is the default. all have the same api

getMapTile(x, y, z, i?)

retrive a tile. 'i' is the load balancing variable, which decides which server to request from. you can set it manually, or leave it and it will be set randomly.

License

MIT