mirror of
https://github.com/expo/react-native-maps.git
synced 2026-11-15 09:18:08 -10:00
* Added GeoJSON component * deleted uuid generation, used index instead * Added geojson description to docs and examples * Added import to App.js in examples * fixed prettier syntax errors * fixed another prettier errors
697 B
697 B
<Geojson /> Component API
Props
| Prop | Type | Default | Note |
|---|---|---|---|
geojson |
Geojson description of object. |
Example
import React from 'react';
import MapView, {Geojson} from 'react-native-maps';
const myPlace = {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {},
geometry: {
type: 'Point',
coordinates: [64.165329, 48.844287],
}
}
]
};
const Map = props => (
<MapView>
<Geojson geojson={myPlace} />
</MapView>
);