diff --git a/example/src/controls/navigationControls.tsx b/example/src/controls/navigationControls.tsx index aaf8060..59fb466 100644 --- a/example/src/controls/navigationControls.tsx +++ b/example/src/controls/navigationControls.tsx @@ -87,7 +87,7 @@ const NavigationControls: React.FC = ({ // single destination: const initWaypoint = async () => { if (!latitude.trim() || !longitude.trim()) { - Alert.alert('Invalid destination'); + Alert.alert('Set lat lng values first'); return; } const waypoint: Waypoint = { @@ -117,19 +117,16 @@ const NavigationControls: React.FC = ({ ); }; - const initWaypointToCameraLocation = async () => { + const setLocationFromCameraLocation = async () => { if (getCameraPosition) { const cameraPosition = await getCameraPosition(); if (cameraPosition) { onLatChanged(cameraPosition.target.lat.toString()); onLngChanged(cameraPosition.target.lng.toString()); } - await initWaypoint(); } }; - // multi destination: - // set your device (emulator) location to new new york timesquare const initWaypoints = async () => { const wp1 = { placeId: 'ChIJw____96GhYARCVVwg5cT7c0', // Golden gate, SF @@ -199,7 +196,7 @@ const NavigationControls: React.FC = ({ const simulateLocation = () => { if (!latitude.trim() || !longitude.trim()) { - Alert.alert('Invalid destination'); + Alert.alert('Set lat lng values first'); return; } @@ -330,6 +327,7 @@ const NavigationControls: React.FC = ({ return ( + Target = ({ placeholderTextColor="#000" keyboardType="numeric" /> -