Last active
March 22, 2020 02:06
-
-
Save softauthor/25bab044235649c249b73e5b68eceed1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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