Skip to content

lastingyeh/ReactNativeMaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-maps demo

for project setup

npm install

#####  run ios emulator

npm run ios 

#### run andriod emulator

npm run android

prepare for link map

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()
              );
            }

MainView

alt tag

DisplayLatLng

show as simple region for location

alt tag

ViewsAsMarkers

use custom-markers at maps

alt tag

EventListener

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)

alt tag

MarkerTypes

use img to create Marker,and add 'onPress' event

alt tag

DraggableMarkers

marker event-triggers

alt tag

PolygonCreator

create and draw region of Polygon

alt tag

PolylineCreator

create and draw region of Polyline

alt tag

AnimatedViews

MapView.Animated applied

alt tag

AnimatedMarkers

Markers Animated

*correct the issues : import { Animated } from 'react-native' replaced by import MapView, { AnimatedRegion } from 'react-native-maps'; 

alt tag

Callouts

event triggers show info-window of mapView

alt tag

Overlays

show how to use  Circle,Polygon,Polyine of MapView

alt tag

DefaultMarkers

use default markers(random color used)

alt tag

CustomMarkers

use custom markers to show

alt tag

CachedMap

use ListView match with MapView cacheEnabled

alt tag

LoadingMap

As Loading effect when MapView prepare

alt tag

TakeSnapshot

Take a snap to be image resource

alt tag

FitToSuppliedMarkers

Animated to show Fit effect for markers

alt tag

FitToCoordinates

Fit markers selected in mapView

alt tag

LiteMapView

Lite Maps list

alt tag

CustomTiles

to be updating..

ZIndexMarkers

marker zIndex used

alt tag

StaticMap

static map at scrollView

alt tag

MapStyle

custom mapStyle used

alt tag

LegalLabel

legal animated

alt tag

SetNativePropsOverlays

use ref by mapView object (circle,polygon,polyline) to set nativeProp

alt tag

CustomOverlay

custom overlay setting

alt tag

BugMarkerWontUpdate

navigator watch && rotate marker demo

alt tag

refs by

  1. https://github.com/airbnb/react-native-maps/tree/master/example

  2. https://github.com/mshameer/react-native-maps-sample

About

react native maps memo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published