Skip to content

Commit 6830b9d

Browse files
committed
Add Polyline
1 parent fa5e670 commit 6830b9d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Polyline.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, { Component } from 'react';
2+
import { Polyline } from 'react-google-maps';
3+
4+
class MapViewPolyline extends Component {
5+
render() {
6+
return <Polyline {...this.props} />;
7+
}
8+
}
9+
10+
export default MapViewPolyline;

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
22
import { View, ActivityIndicator, StyleSheet } from 'react-native';
33
import { withGoogleMap, GoogleMap } from 'react-google-maps';
44
import Marker from './Marker';
5+
import Polyline from './Polyline';
56

67
const GoogleMapContainer = withGoogleMap(props => (
78
<GoogleMap {...props} ref={props.handleMapMounted} />
@@ -47,6 +48,7 @@ class MapView extends Component {
4748
}
4849

4950
MapView.Marker = Marker;
51+
MapView.Polyline = Polyline;
5052

5153
const styles = StyleSheet.create({
5254
container: {

0 commit comments

Comments
 (0)