| 12 | const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO; |
| 13 | |
| 14 | class CustomOverlay extends React.Component<any, any> { |
| 15 | constructor(props: any) { |
| 16 | super(props); |
| 17 | |
| 18 | this.state = { |
| 19 | region: { |
| 20 | latitude: LATITUDE, |
| 21 | longitude: LONGITUDE, |
| 22 | latitudeDelta: LATITUDE_DELTA, |
| 23 | longitudeDelta: LONGITUDE_DELTA, |
| 24 | }, |
| 25 | coordinates: [ |
| 26 | { |
| 27 | longitude: -122.442753, |
| 28 | latitude: 37.79879, |
| 29 | }, |
| 30 | { |
| 31 | longitude: -122.424728, |
| 32 | latitude: 37.801232, |
| 33 | }, |
| 34 | { |
| 35 | longitude: -122.422497, |
| 36 | latitude: 37.790651, |
| 37 | }, |
| 38 | { |
| 39 | longitude: -122.440693, |
| 40 | latitude: 37.788209, |
| 41 | }, |
| 42 | ], |
| 43 | center: { |
| 44 | longitude: -122.4326648935676, |
| 45 | latitude: 37.79418561114521, |
| 46 | }, |
| 47 | }; |
| 48 | } |
| 49 | |
| 50 | render() { |
| 51 | const {coordinates, center, region} = this.state; |
| 52 | return ( |
| 53 | <View style={styles.container}> |
| 54 | <MapView |
| 55 | provider={this.props.provider} |
| 56 | style={styles.map} |
| 57 | initialRegion={region}> |
| 58 | <XMarksTheSpot coordinates={coordinates} center={center} /> |
| 59 | </MapView> |
| 60 | </View> |
| 61 | ); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | const styles = StyleSheet.create({ |
| 66 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…