Files
Nikita Perevyazkin b781c1184b Added GeoJSON support by default (#2959)
* 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
2019-08-07 09:25:08 -07:00

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>
);