flutter-maplibre-gl
flutter-maplibre-gl copied to clipboard
Support 3D terrain?
Does this plugin supports 3D already? Example from JS version of library: https://docs.mapbox.com/mapbox-gl-js/example/add-terrain/
You are linking to Mapbox docs, but this is a MapLibre plugin. (Though it is forked from a Mapbox plugin.) So if you are looking for Mapbox specific features, you should look at Mapbox plugins.
AFAIK MapLibre recently added support for 3d terrain, but there have not been any explicit changes for that in this plugin, yet.
I just tested, it works on web but not on mobile (hillside is working on mobile though). You can use this demo style to try:
{
"version": 8,
"sources": {
"raster-tiles": {
"type": "raster",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
],
"tileSize": 256,
"attribution": "<a target='_top' rel='noopener' href='http://openstreetmap.org'>© OpenStreetMap</a>"
},
"terrainSource": {
"type": "raster-dem",
"url": "https://demotiles.maplibre.org/terrain-tiles/tiles.json",
"tileSize": 256
},
"hillshadeSource": {
"type": "raster-dem",
"url": "https://demotiles.maplibre.org/terrain-tiles/tiles.json",
"tileSize": 256
}
},
"layers": [
{
"id": "simple-tiles",
"type": "raster",
"source": "raster-tiles",
"minzoom": 0,
"maxzoom": 22
},
{
"id": "hills",
"type": "hillshade",
"source": "hillshadeSource",
"layout": { "visibility": "visible" },
"paint": { "hillshade-shadow-color": "#473B24" }
}
],
"terrain": {
"source": "terrainSource",
"exaggeration": 1
},
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
}