mapbox_static_helper
Provides urls and pixel positions for loading MapBox's static (square) tiles and create a bigger image
Installation
Using npm:
$ npm install mapbox_static_helper
Usage
let map = require('mapbox_static_helper');
map.setup({
mapBoxToken,
screen_width,
screen_height,
zoom,
map_style,
location_data,
tile_size,
attribution,
double
});
let image_urls = mp.getUrlsAndXY();
map.setStyle(style);
console.log(map.getStyle());
map.setLocation(location_data);
let location_data = map.getLocation();
TODO
- Not sure it's working well in conjunction with the laton_to_xy conversions module when changing tile size. What works for me is setting the tile size to 512 in the laton_to_xy module ant to 1024 here
- Maybe we should make this module completely independent of laton_to_xy