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.FillLayer id="geojson-layer-id" sourceId="geojson-id" style={style}
/>
</Mapa.GeoJSONSource>
</Mapa.MapView>FillLayer
Props
id
id:
string
Unique identifier for the layer
sourceLayerID?
optionalsourceLayerID:string
Source style layer mapping
existing?
optionalexisting:boolean
If the layer ID already exists, a new layer will not be created
sourceId?
optionalsourceId:string
Source 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:
FillLayerStyleProps