mapbox_static_helper
Provides urls and pixel positions for loading MapBox's static (square) tiles and create a bigger image
- Used for creating the SRT log viewer in https://djitelemetryoverlay.com
Installation
Using npm:
$ npm install mapbox_static_helper
Usage
//Load modulelet map = ; //set values //for example satellite-v9 map;let image_urls = mp;//getUrlsAndXY() returns an array of objects, with 3 values each: url (string), x and y (center position of image on screen) //Other methodsmap; //sets the style stringconsole; //returns the style stringmap; //sets the location instance of latlon_to_xylet location_data = map; //returns the location instance of latlon_to_xy
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