Created
December 4, 2017 15:27
-
-
Save princessjanf/d4ab9177a91da8c4909aabd0a0f956be to your computer and use it in GitHub Desktop.
View polyline from google directions api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
return ( | |
<MapView style={styles.map} initialRegion={{ | |
latitude:-6.270565, | |
longitude:106.759550, | |
latitudeDelta: 1, | |
longitudeDelta: 1 | |
}}> | |
<MapView.Polyline | |
coordinates={this.state.coords} | |
strokeWidth={2} | |
strokeColor="red"/> | |
</MapView> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
map: { | |
position: 'absolute', | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment