Ok, The easier fix is to just delete some of the detailed lat and lng. So instead of 38.2334443 its 38.23
Aug 16, 2020
4
Level 10
Using autocomplete and RE-Searching address with only postal_code
Hi, I am struggling with a specific problem. For each event a user uploads I get the address using google autocomplete. I want to set it up so users can say don't show my specific address and instead it will use the latitude and longitude of the city or zip code returned from their address.
mounted() {
this.autocomplete = new google.maps.places.Autocomplete(
(this.$refs.autocomplete),
{types: ['geocode']}
);
this.autocomplete.addListener('place_changed', this.setPlace);
},
I tried adding this to the mounted
this.incognito = new google.maps.places.Autocomplete(
(this.hiddenSearch),
{types: ['geocode']}
);
and then when I submit
onIncognitoSubmit() {
this.hiddenSearch = this.location.postal_code ? this.location.postal_code : this.location.city;
let place = this.incognito.getPlace();
but I get an undefined and when the page first loads I get the error InvalidValueError: not an instance of HTMLInputElement. Thanks for any help!
Please or to participate in this conversation.