React Native Module for IOS MapKit Local Search
This module requires react-native-maps
as a peer dependency. Run the following first if it is not an existing dependency.
npm install --save react-native-maps
npm install --save react-native-localsearch
After install, also run pod install
for auto linking.
cd ios/ && pod install
import { RNLocalSearch } from 'react-native-localsearch';
RNLocalSearch.searchForLocations(searchString, region, callback(err, resp) => {});
import { RNLocalSearch } from 'react-native-localsearch';
const region = {
latitude: 30.2669444,
longitude: -97.7427778,
latitudeDelta: 0.1,
longitudeDelta: 0.1
};
RNLocalSearch.searchForLocations('restaurants', region, callback(err, resp) => {});