tsx
import Mapa from 'react-native-mapa';
// or import { MapView, Camera } from 'react-native-mapa';
<Mapa.MapView>
<Mapa.Camera pitch={60} />
<Mapa.GeoJSONSource id={'geojson-id'} url={geojson}>
<Mapa.FillExtrusionLayer
id="geojson-layer-id"
sourceId="geojson-id"
style={style}
/>
</Mapa.GeoJSONSource>
</Mapa.MapView>FillExtrusionLayer
3D polygon layer, for example to render buildings
Props
id
id:
string
Unique identifier for the layer
sourceLayerID?
optionalsourceLayerID:string
Source style layer mapping
existing?
optionalexisting:boolean
If layer ID already exists, don't create a new layer
sourceId?
optionalsourceId:string
Source data identifier
layerIndex?
optionallayerIndex:number
Insert layer at specified index
aboveLayerID?
optionalaboveLayerID:string
Insert above the specified layer ID
belowLayerID?
optionalbelowLayerID:string
Insert below the specified layer ID
filter?
optionalfilter:Expression
Mapbox filter expression
minZoom?
optionalminZoom:number
Minimum zoom level for layer visibility
maxZoom?
optionalmaxZoom:number
Maximum zoom level for layer visibility
slot?
optionalslot:"bottom"|"middle"|"top"
style
style:
FillExtrusionLayerStyleProps