leaflet-blurred-location icon indicating copy to clipboard operation
leaflet-blurred-location copied to clipboard

Cut down multiple API requests from Geocoding.js

Open rexagod opened this issue 6 years ago • 2 comments

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.

https://github.com/publiclab/leaflet-blurred-location/blob/51744030cd0847a0309cbbc3354482e35e17a2aa/src/core/Geocoding.js#L7

https://github.com/publiclab/leaflet-blurred-location/blob/51744030cd0847a0309cbbc3354482e35e17a2aa/src/core/Geocoding.js#L111

// 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

rexagod avatar Feb 20 '19 23:02 rexagod

Ah, is this on local?

On Wed, Feb 20, 2019 at 3:08 PM Pranshu Srivastava [email protected] wrote:

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.

https://github.com/publiclab/leaflet-blurred-location/blob/51744030cd0847a0309cbbc3354482e35e17a2aa/src/core/Geocoding.js#L7

https://github.com/publiclab/leaflet-blurred-location/blob/51744030cd0847a0309cbbc3354482e35e17a2aa/src/core/Geocoding.js#L111

// 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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/leaflet-blurred-location/issues/186, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ7muTRZSO2NQUMRqrI5B15KH-BRYks5vPdVmgaJpZM4bGTkj .

jywarren avatar Feb 21 '19 00:02 jywarren

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

rexagod avatar Feb 21 '19 00:02 rexagod