File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ The supported components are `MapView` and `MapView.Marker`.
4242- The supported events are:
4343 - ` onRegionChange `
4444 - ` onRegionChangeComplete `
45+ - ` onPress `
4546
4647` MapView.Marker ` :
4748- The supported props are:
Original file line number Diff line number Diff line change @@ -9,10 +9,17 @@ storiesOf('MapView', module)
99 . add ( 'basic' , ( ) => < MapView region = { { latitude : 48.86 , longitude : 2.34 } } /> )
1010 . add ( 'onRegionChangeComplete' , ( ) => (
1111 < View >
12- < MapView region = { { latitude : 48.86 , longitude : 2.34 } } onRegionChangeComplete = { action ( 'new coordinates' ) } />
12+ < MapView
13+ region = { { latitude : 48.86 , longitude : 2.34 } }
14+ onRegionChangeComplete = { action ( 'onRegionChangeComplete toggled' ) }
15+ />
1316 </ View >
14- ) ) ; &
15-
17+ ) )
18+ . add ( 'onPress' , ( ) => (
19+ < View >
20+ < MapView region = { { latitude : 48.86 , longitude : 2.34 } } onPress = { action ( 'onPress toggled' ) } />
21+ </ View >
22+ ) ) ;
1623storiesOf ( 'Marker' , module ) . add ( 'basic' , ( ) => (
1724 < MapView region = { { latitude : 48.88 , longitude : 2.32 } } >
1825 < MapView . Marker title = "BAM" coordinate = { { latitude : 48.8828463 , longitude : 2.3229091 } } />
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class MapView extends Component {
3636 onDragStart = { ! ! this . props . onRegionChange && this . props . onRegionChange }
3737 onDragEnd = { this . onDragEnd }
3838 defaultZoom = { 15 }
39+ onClick = { this . props . onPress }
3940 >
4041 { this . props . children }
4142 </ GoogleMapContainer >
You can’t perform that action at this time.
0 commit comments