3dstreet
3dstreet copied to clipboard
simple mapbox static image component
why? the existing mapbox component:
- does not accurately size the map (1:1)
- creates a plane that stays white until the image loads (instead of using asset loader to block scene display, or hiding plane until texture is loaded)
- produces inconsistent visual output depending on device
Idea instead:
- for a given lat / lon use static mapbox api to generate an image https://docs.mapbox.com/playground/static/
- https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/static/-122.4174,37.7652,17.44,0/1024x1024?access_token=[omitted]
- then size the plane automatically based on zoom, latitude and dimensions https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale
- wait to display the plane until the map is loaded, or display something else in place