-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D view in maplibre #758
Comments
Right now, you could add a terrain layer into your style, like I thought in the past about having a toggle button if a raster-dem existed in sources, but you would have to know the name of the layer. maybe in javascript we could iterate though raster-dem sources and make a button for each of them. |
@acalcutt as always many thanks for the quick reply. We already have the terrain source in our style hence the request. If we are using the Terrain entry in our json like this : Would it be possible for the maplibre viewer embedded in tileserver-gl to detect it and enable the 3D view ? |
I'm not talking about a terrain source, but a terrain layer (like at the very end of the file I linked). It lets maplibre-gl-js to show the terrain. |
nevermind, it looks like you already have it. Are you talking about vector viewer or raster? vector/view pages should show terrain. raster/rendered pages can not because maplibre-native does not yet support 3d terrain. |
Take this as an example ( https://tiles.wifidb.net/styles/WDB_ATV/#12.33/46.11406/8.27133/-24/58 ) With the terrain source and layer, terrain does show in viewer. |
Not successful so far with that : https://maps.utagawavtt.com/styles/utagawavtt/style.json
Any idea ?
|
I don't see the terrain layer I mentioned in your style. I do see a 'world-rgb-png' source, but its not used for terrain. |
Your style is confusing to me. how come you link to other rendered styles as sources? |
Do you have an actual terrainrgb/terrarium raster-dem somewhere? |
Made it working (issue was the style was not refreshed as expected du to the recent implementation of nginx cache). However I see the 3D camera pitch is kind of limited (also in your example), any reason why ? |
Do you mean the 60 degree pitch limit? it is a maplibre-gl-js default, we would have to change the view template so it sets the 'maxPitch' map option
In my own maps I usually set maxPitch to 85, like in |
|
I don't think it is a good idea until maplibre-gl-js 3.0 is released which has perfomance updates for terrain. The extra angle makes the map have to load a lot more, so this performance is important. Right now above 60deg is considered experimental. Also, I think it would be nice if sky was implemented first, which I think also may end up a 3.0 thing. |
Maplibre 3.0 has been released ! :-) |
In the native viewer of Tileserver-GL (the index page) would it be possible to have 3D view if the sources contains terrain-rgb DEM data ?
The text was updated successfully, but these errors were encountered: