()
| 31 | } |
| 32 | |
| 33 | render() { |
| 34 | if (this.props.provider !== PROVIDER_GOOGLE) { |
| 35 | return ( |
| 36 | <View style={styles.error}> |
| 37 | <Text>Heatmap is not supported on Apple maps.</Text> |
| 38 | </View> |
| 39 | ); |
| 40 | } |
| 41 | return ( |
| 42 | <View style={styles.container}> |
| 43 | <MapView |
| 44 | provider={this.props.provider} |
| 45 | style={styles.map} |
| 46 | initialRegion={this.state.region}> |
| 47 | <Heatmap |
| 48 | points={this.state.points} |
| 49 | opacity={1} |
| 50 | radius={50} |
| 51 | gradient={{ |
| 52 | colors: ['#00f', '#0ff', '#0f0', '#ff0', '#f00'], |
| 53 | startPoints: [0.1, 0.3, 0.5, 0.7, 1], |
| 54 | colorMapSize: 256, |
| 55 | }} |
| 56 | /> |
| 57 | </MapView> |
| 58 | </View> |
| 59 | ); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | const styles = StyleSheet.create({ |
nothing calls this directly
no outgoing calls
no test coverage detected