Over the final dyad of weeks quite a few interactive maps accept been released which accept made occupation of the novel extrude property inwards Mapbox GL. All of these maps accept used the extrude belongings to practice 3d buildings on a map. All of the maps thence accept (or could have) used the extrusion belongings alongside the edifice meridian information which is already available inwards the default map styles inwards Mapbox Studio.
The Mapbox GL extrude belongings withal tin dismiss likewise survive used to practice 3d features out of your ain information layers. For illustration this San Francisco Lidar Map applies the extrude belongings to San Francisco tree in addition to edifice Lidar data. This Lidar information has been added to the map inwards Mapbox Studio from a GeoJSON file (presumably downloaded from the City of San Francisco). The consequence of using this Lidar information is that every bit good every bit visualizing buildings inwards 3d the map likewise extrudes other features, such every bit ships in addition to private trees.
If yous desire to occupation the extrude belongings alongside your ain information inwards Mapbox GL in addition to so yous bespeak to kickoff past times adding your ain data layer inwards Mapbox Studio. If yous await at the JavaScript code for the San Francisco Lidar Map yous tin dismiss come across that the extrude belongings is beingness applied to the 'DN' belongings of the GeoJSON Lidar data. In other words the map is changing the mode of the Lidar information layer based on the information properties (in this instance the 'DN' property).
In unproblematic price - if yous desire to extrude a belongings on your map yous bespeak to accept a belongings inwards your information layer which tin dismiss survive extruded.
You tin dismiss larn to a greater extent than nearly how to occupation the Mapbox GL mode specification to define the agency inwards which the information relates to the map mode inwards the Mapbox GL Data-Driven Style Reference section of the Mapbox documentation. In detail yous should await at the paragraphs headed the 'Required mode sail objects for data-driven styles' in addition to the 'Fill layer extrusion, identity function'.
Buat lebih berguna, kongsi: