Open Thebigbignooby opened 1 year ago
Valid question.
ShadeMap renders shadows based on elevation data and the position of the sun. ShadeMap doesn't have access to the 3D terrain and buildings rendered on a mapbox-gl map (but also due to the fact that it needs to work with libraries like Leaflet which have no 3D terrain capabilities) so it needs to load its own elevation data.
This data can some from S3, or your own server or even from Mapbox's terrain tiles (I'm actually starting to use LiDAR surface models as the data source on shademap.app), but you have to tell ShadeMap where to download the elevation data tiles from, what the tile sizes are, up to what zoom level tiles are available for and how to decode them.
If you remove this property from the configuration object, it will actually default to the Amazon AWS elevation dataset, so it's not really necessary but you should know that under the covers you do need an elevation data source.
As far as building elevation data goes, the getFeatures() function needs to return the building data and I have an example on how to extract building data from Mapbox vector tiles in the README.md
PS. I probably just need a 5 minute YouTube code-along tutorial don't I?
Hi, thanks for this library!
I'm trying to make it work with my map, I have followed the guide and I'm a little confused.
I have a mapbox map using mabox-gl, with 3d buildings and terrain from mapbox.
Given that I'm getting terrain from mapbox, do I still need this block? what exactly does this block do?