npm install
##### run ios emulator
npm run ios
#### run andriod emulator
npm run android
1. import MapView from 'react-native-maps'
2. rnpm link (needs for npm i -g rnpm) or react-native link
3. for android use
3.1 apply for Android key -
get API_KEY from https://developers.google.com/maps/documentation/android-api/signup
3.2 Added API Key in android/app/src/main/AndroidManifest.xml
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="your-api-key"/>
3.3 android/app/src/main/java/com/thirtydaysofreactnative/MainApplication.
import com.airbnb.android.react.maps.MapsPackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MapsPackage(),
new MainReactPackage()
);
}
show as simple region for location
use custom-markers at maps
1. show for mapView event-triggers
2. Marker
3. Polygon
4. Polyline
* modify path for SyntheticEvent (react-native/Libraries/Renderer/src/renderers/shared/shared/event/SyntheticEvent)
use img to create Marker,and add 'onPress' event
marker event-triggers
create and draw region of Polygon
create and draw region of Polyline
MapView.Animated applied
Markers Animated
*correct the issues : import { Animated } from 'react-native' replaced by import MapView, { AnimatedRegion } from 'react-native-maps';
event triggers show info-window of mapView
show how to use Circle,Polygon,Polyine of MapView
use default markers(random color used)
use custom markers to show
use ListView match with MapView cacheEnabled
As Loading effect when MapView prepare
Take a snap to be image resource
Animated to show Fit effect for markers
Fit markers selected in mapView
Lite Maps list
to be updating..
marker zIndex used
static map at scrollView
custom mapStyle used
legal animated
use ref by mapView object (circle,polygon,polyline) to set nativeProp
custom overlay setting
navigator watch && rotate marker demo