react-native-typescript-geojson
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

react-native-typescript-geojson

Typescript version of: react-native-geojson

Fast way to add geojson to react-native-maps. with some typescript and utils, but still very tiny! less than 8kb!

Install:

npm install react-native-typescript-geojson

yarn add react-native-typescript-geojson

Example:

import React from 'react';
import MapView from 'react-native-maps';
import Geojson from 'react-native-geojson';

const alcatraz = {
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {},
      geometry: {
        type: 'Point',
        coordinates: [-122.42305755615234, 37.82687023785448]
      }
    }
  ]
};

const Map = props => (
  <MapView>
    <Geojson geojson={alcatraz} />
  </MapView>
);

RoadMap:

  • [ ] Set up eslint
  • [x] Set up minify
  • [ ] Testing
  • [ ] Refactor
  • [x] Add more typings
  • [ ] Accept more props
  • [ ] Better examples

Package Sidebar

Install

npm i react-native-typescript-geojson@0.0.2

Version

0.0.2

License

MIT

Unpacked Size

9.52 kB

Total Files

8

Last publish

Collaborators

  • rassell