Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut down multiple API requests from Geocoding.js #186

Open
rexagod opened this issue Feb 20, 2019 · 2 comments
Open

Cut down multiple API requests from Geocoding.js #186

rexagod opened this issue Feb 20, 2019 · 2 comments

Comments

@rexagod
Copy link
Member

rexagod commented Feb 20, 2019

Currently there are two different functions sending requests to the Maps API. We should look out for options to cut down this multiple use of the API.

url:"https://maps.googleapis.com/maps/api/geocode/json?latlng="+lat+","+lng + "&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE",

var url = "https://maps.googleapis.com/maps/api/geocode/json?address=" + string.split(" ").join("+") + "&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE" ;

// Jasmine logs
>> You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. at
>> https:/maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE:128 th
>> You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. at
>> https:/maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE:128 th
>> You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. at
>> https:/maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE:128 th
>> You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. at
>> https:/maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE:128 th
>> You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. at
>> https:/maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE:128 th
@jywarren
Copy link
Member

jywarren commented Feb 21, 2019 via email

@rexagod
Copy link
Member Author

rexagod commented Feb 21, 2019

Yes, @jywarren, right after running grunt jasmine, even on the successful ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants