You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i start typing into the input field i get soo many suggestions because it is not limited to the area around the user so much so that my app breaks and freezes eventually it just crashes and i need to hard restart the server , I tried using locationBias inorder to limit the range of suggesstion to 5km around the user but it doesn't work
Here i am currently getting the users location
import{useState}from'react';constuseCurrentLocation=()=>{const[location,setLocation]=useState<GeolocationPosition|null>(null);const[error,setError]=useState<string|null>(null);constrequestLocation=()=>{if(!navigator.geolocation){setError('Geolocation is not supported by your browser');return;}navigator.geolocation.getCurrentPosition((position)=>{setLocation(position);},(err)=>{setError(err.message);});};return{ location, error, requestLocation };};exportdefaultuseCurrentLocation;
Here i use it in my modal form to population locationBias with lat and Lng
Coding Questions
When i start typing into the input field i get soo many suggestions because it is not limited to the area around the user so much so that my app breaks and freezes eventually it just crashes and i need to hard restart the server , I tried using locationBias inorder to limit the range of suggesstion to 5km around the user but it doesn't work
Here i am currently getting the users location
Here i use it in my modal form to population locationBias with lat and Lng
Here i pass it in the usePlacesHook Instance
This is the part of my form that handles geocoding
The text was updated successfully, but these errors were encountered: