Skip to content

Instantly share code, notes, and snippets.

@ryder247
Last active February 6, 2020 10:12
Show Gist options
  • Select an option

  • Save ryder247/dcb423f11bd99df8933aaf007b49302c to your computer and use it in GitHub Desktop.

Select an option

Save ryder247/dcb423f11bd99df8933aaf007b49302c to your computer and use it in GitHub Desktop.

Revisions

  1. ryder247 renamed this gist Feb 6, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion geocode api → geocode api JSONP
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    getCountries() {
    //
    getCountries() {
    return this.http.jsonp(
    `https://secure.geonames.org/countryInfoJSON?lang=${localStorage['language'] || ''}&username=<USERNAME_HERE>&style=short`,
    'callback',
  2. ryder247 revised this gist Feb 6, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions geocode api
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    getCountries() {
    return this.http.jsonp(
    `https://secure.geonames.org/countryInfoJSON?lang=${localStorage['language'] || ''}&username=scycop&style=short`,
    `https://secure.geonames.org/countryInfoJSON?lang=${localStorage['language'] || ''}&username=<USERNAME_HERE>&style=short`,
    'callback',
    );
    }

    getChildren(geonameId: string) {
    return this.http.jsonp(
    `https://secure.geonames.org/childrenJSON? lang=${localStorage['language'] ||
    ''}&geonameId=${geonameId}&username=scycop&style=short`,
    ''}&geonameId=${geonameId}&username=<USERNAME_HERE>&style=short`,
    'callback',
    );
    }
  3. ryder247 created this gist Feb 6, 2020.
    14 changes: 14 additions & 0 deletions geocode api
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    getCountries() {
    return this.http.jsonp(
    `https://secure.geonames.org/countryInfoJSON?lang=${localStorage['language'] || ''}&username=scycop&style=short`,
    'callback',
    );
    }

    getChildren(geonameId: string) {
    return this.http.jsonp(
    `https://secure.geonames.org/childrenJSON? lang=${localStorage['language'] ||
    ''}&geonameId=${geonameId}&username=scycop&style=short`,
    'callback',
    );
    }