Skip to content

Instantly share code, notes, and snippets.

@princessjanf
Created December 4, 2017 15:33
Show Gist options
  • Save princessjanf/ca0e56142ec501ba6c2b0619b348ff89 to your computer and use it in GitHub Desktop.
Save princessjanf/ca0e56142ec501ba6c2b0619b348ff89 to your computer and use it in GitHub Desktop.
{!!this.state.latitude && !!this.state.longitude && this.state.x == 'true' &&
<MapView.Polyline
coordinates={this.state.coords}
strokeWidth={2}
strokeColor="red"
/>
}
{!!this.state.latitude && !!this.state.longitude && this.state.x == 'error' &&
<MapView.Polyline
coordinates={[
{latitude: this.state.latitude, longitude: this.state.longitude},
{latitude: this.state.cordLatitude, longitude: this.state.cordLongitude},
]}
strokeWidth={2}
strokeColor="red"
/>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment