Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 888 Bytes

geojson.md

File metadata and controls

44 lines (36 loc) · 888 Bytes

<Geojson /> Component API

Props

Prop Type Default Note
geojson Geojson description of object.
strokeColor String #000
fillColor String
strokeWidth Number 1

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} 
      strokeColor="red"
      fillColor="green"
      strokeWidth={2}
    />
  </MapView>
);