I am using the library name react-google-autocomplete
in React. It working fine but it does not return full and complete addresses. For example, I am living in a city named (ABC).
ABC has a sector name F-10 and its building name is (Example-Building, F-10). When I type ABC
it returns ABC but when I type F-10 and building name
it does not return its name. I want to get a full street address, Could someone please help me with how to do it. Thanks
In public.html I've included a google map file
<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY&libraries=places"></script>
export const RenderAddress = () => {
return (
<Autocomplete
className="registrationTextField"
apiKey={"API_KEY"}
onPlaceSelected={(place) => {
console.log(place);
}}
options={{
types: ["(regions)"],
componentRestrictions: { country: "pk" },
}}
/>
);
};