Bug #6480
closedGoogle Maps API fails often
0%
Description
For some reason I get a lot of errors from the Google Maps API when I am connecting from a slower connection on the bus wifi. I would like to find out what is causing this error (which doesn't occur on the DataCatalogView) or even better, not load the Google Maps API at all for views that don't use it.
Updated by ben leinfelder almost 11 years ago
I thought we had wired it up so that if there was a gmaps load failure, the app would still load, but the map would just not render. I have seen (though not recently now that It hink about it) the site fail to load because of the gmaps api. I would just refresh the page and it would work. Not sure if that is related to what you are seeing.
Updated by Lauren Walker over 10 years ago
For some reason it only happens in the Statistics View, so far. The DataCatalog View will load fine for me in those cases but I have to continuously reload the StatsView until I stop getting the error. I have had cases where the GMaps API fails and then list view loads, but for this particular view it stops the rendering of the whole page, even though GMaps isn't needed.
Updated by Lauren Walker over 10 years ago
- Status changed from New to Works For Me
I haven't been able to recreate this error so I will come back to it later if needed.
Updated by Lauren Walker over 10 years ago
- Subject changed from Google Maps API fails often for profile view to Google Maps API fails often
- Status changed from Works For Me to In Progress
- Priority changed from Normal to High
- Target version changed from 1.5.0 to 1.6.0
This is still an issue for many people and makes the app nonfunctional. It is happening in any view since Require.js tries to load GMaps upon page load, regardless of the current view.
Updated by Lauren Walker over 10 years ago
- Status changed from In Progress to Resolved
These Gmap errors were occurring because the app would define the GMaps URL in the Require configuration, then would soon after "require" the Gmaps component in the app. On fast connections, the app would have received a response from Google, would "require" the Gmaps component ok, and would continue loading the rest of the app.
On slower connections, the app would still be waiting for a response from Google before it "required" GMaps, and would fail.
The Google Maps component of the app is now loaded and defined first in the app.js file before all other Require.js configuration. This makes the app wait for a response from Google before continuing to load. The app can still work offline for development purposes by removing the Google Maps option (i.e. removing the Google Maps API key in index.html).