Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

react-native-safe-mapview

1.0.0 • Public • Published

react-native-safe-mapview

React Native Map Component which catches errors and works smoothly

Installation

npm i -S react-native-safe-mapview or yarn add react-native-safe-mapview

Why

  • Many devs use setState for region and it causes performance issue which is solved by this component
  • It also catches errors so you can happily work about other stuff

Usage

<SafeMapView
  // ref for getting instance of mapview for advance actions
  ref={ref => {
    this.mapRef = ref;
  }}
  // set any initial regionit's required
  initialRegion={{
    latitude: 12.9748534,
    longitude: 77.627675,
    latitudeDelta: 0.0922,
    longitudeDelta: 0.0421
  }}
  // Set region whenever you want
  region={this.state.region}
/>

install

npm i react-native-safe-mapview

Downloadsweekly downloads

0

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability