mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-21 14:08:31 -04:00
ObsEdit location test uses required acc, no desired
This commit is contained in:
@@ -20,7 +20,7 @@ import LoadingIndicator from "./LoadingIndicator";
|
||||
import LocationSearch from "./LocationSearch";
|
||||
|
||||
export const DESIRED_LOCATION_ACCURACY = 100;
|
||||
export const REQUIRED_LOCATION_ACCURACY = 500000;
|
||||
export const REQUIRED_LOCATION_ACCURACY = 500_000;
|
||||
|
||||
type Props = {
|
||||
accuracy: number,
|
||||
@@ -62,8 +62,6 @@ const LocationPicker = ( {
|
||||
// prevent initial map render from resetting the coordinates and locationName
|
||||
const [initialMapRender, setInitialMapRender] = useState( true );
|
||||
|
||||
console.log( "[DEBUG LocationPicker.js] rendering" );
|
||||
|
||||
return (
|
||||
<KeyboardDismissableView>
|
||||
<ViewWrapper testID="location-picker">
|
||||
|
||||
@@ -12,14 +12,15 @@ import { Dimensions } from "react-native";
|
||||
import fetchPlaceName from "sharedHelpers/fetchPlaceName";
|
||||
import useStore from "stores/useStore";
|
||||
|
||||
import LocationPicker from "./LocationPicker";
|
||||
import LocationPicker, {
|
||||
DESIRED_LOCATION_ACCURACY,
|
||||
REQUIRED_LOCATION_ACCURACY
|
||||
} from "./LocationPicker";
|
||||
|
||||
const { width } = Dimensions.get( "screen" );
|
||||
|
||||
const DELTA = 0.02;
|
||||
const CROSSHAIRLENGTH = 254;
|
||||
export const DESIRED_LOCATION_ACCURACY = 100;
|
||||
export const REQUIRED_LOCATION_ACCURACY = 500000;
|
||||
|
||||
const estimatedAccuracy = longitudeDelta => longitudeDelta * 1000 * (
|
||||
( CROSSHAIRLENGTH / width ) * 100 );
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
|
||||
import { DESIRED_LOCATION_ACCURACY } from "components/LocationPicker/LocationPicker";
|
||||
import { REQUIRED_LOCATION_ACCURACY } from "components/LocationPicker/LocationPicker";
|
||||
import {
|
||||
differenceInCalendarYears,
|
||||
isFuture,
|
||||
@@ -65,7 +65,7 @@ const EvidenceSectionContainer = ( {
|
||||
const positionalAccuracyBlank = isNil( currentObservation?.positional_accuracy );
|
||||
const positionalAccuracyDesireable = (
|
||||
currentObservation?.positional_accuracy || 0
|
||||
) <= DESIRED_LOCATION_ACCURACY;
|
||||
) <= REQUIRED_LOCATION_ACCURACY;
|
||||
let validPositionalAccuracy = ( positionalAccuracyBlank || positionalAccuracyDesireable );
|
||||
|
||||
if ( isNewObs && hasImportedPhotos ) {
|
||||
|
||||
Reference in New Issue
Block a user