Skip to content

Instantly share code, notes, and snippets.

@softauthor
Last active March 22, 2020 02:06
Show Gist options
  • Save softauthor/25bab044235649c249b73e5b68eceed1 to your computer and use it in GitHub Desktop.
Save softauthor/25bab044235649c249b73e5b68eceed1 to your computer and use it in GitHub Desktop.
findCloseBuyButtonPressed() {
const URL = `https://cors-anywhere.herokuapp.com/https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${
this.lat
},${this.lng}&type=${this.type}&radius=${this.radius *
1000}&key=[YOURAPIKEY]`;
axios
.get(URL)
.then(response => {
this.places = response.data.results;
this.addLocationsToGoogleMaps();
})
.catch(error => {
console.log(error.message);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment