mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-19 05:01:07 -04:00
* Obs detail screen skeleton; move safe area view to wrapper component * Progress on obs detail * Get ids and photos from api v2 * Fetch data needed for data tab in obs detail * Create basic map for data tab, centered on lat/long * Create linked realms for photos and identifications; access these on obs detail screen * User Profile and more setup for test suite * Delete coverage directory * Add Jest coverage folder to gitignore * Keep trying to mock out fetch for inatjs in ObsList.test.js * Rename ObsList.test to match component name
30 lines
680 B
JavaScript
30 lines
680 B
JavaScript
// @flow
|
|
|
|
import * as React from "react";
|
|
import { View } from "react-native";
|
|
import MapView from "react-native-maps";
|
|
import { viewStyles } from "../../styles/sharedComponents/map";
|
|
|
|
type Props = {
|
|
latitude: number,
|
|
longitude: number
|
|
}
|
|
|
|
// this component will need a fallback to another map library
|
|
// for people who don't use GMaps (i.e. users in China)
|
|
const Map = ( { latitude, longitude }: Props ): React.Node => (
|
|
<View style={viewStyles.mapContainer}>
|
|
<MapView
|
|
style={viewStyles.map}
|
|
initialRegion={{
|
|
latitude,
|
|
longitude,
|
|
latitudeDelta: 0.0922,
|
|
longitudeDelta: 0.0421
|
|
}}
|
|
/>
|
|
</View>
|
|
);
|
|
|
|
export default Map;
|