Skip to content

Instantly share code, notes, and snippets.

@softauthor
Last active March 22, 2020 02:06

Revisions

  1. softauthor revised this gist Mar 22, 2020. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion closebuy-5.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,15 @@
    npm install axios --save
    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);
    });
    },
  2. softauthor created this gist Mar 22, 2020.
    1 change: 1 addition & 0 deletions closebuy-5.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    npm install axios --save