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
I was thinking if we could add a getAddressComponent(result: GeocodeResult) utility function? 🤔
This would be similar to getZipCode utility function. getAddressComponent can be applicable to extract other address components like state, county, country, street number, route, city, etc. from the GeoCodeResult object.
Describe the Solution You'd Like
I was thinking of something like below, I have a WIP Commit HERE
This would be a great addition to the library. I am not sure if this will be implemented anytime soon, but there is a way to get more details about the address of the location. In the getGeoCode utility function. The result should return more details of the location search
// Get latitude and longitude via utility functions
getGeocode({ address: suggestion.description }).then((results) => {
// Contains details of the description (address, zip code, country, etc...)
console.log(results)
const { lat, lng } = getLatLng(results[0])
onChangeLocation(lat, lng)
})
Hope this helps anyone needing to find the actual address of the search.
Feature Request
Describe the Feature
I was thinking if we could add a
getAddressComponent(result: GeocodeResult)
utility function? 🤔This would be similar to
getZipCode
utility function.getAddressComponent
can be applicable to extract other address components likestate
,county
,country
,street number
,route
,city
, etc. from theGeoCodeResult
object.Describe the Solution You'd Like
I was thinking of something like below, I have a WIP Commit HERE
The text was updated successfully, but these errors were encountered: