Loading google map api breaks ionic links and transitions in iOS

Apparently this simple javascript load breaks the ionic transitions in iOS:

<script src='https://maps.googleapis.com/maps/api/js?sensor=true'></script>

I’m using this in conjunction with angular-google-maps, it doesn’t matter whether I include a valid Google MAP API key or not (please don’t say I didn’t include the API key, it doesn’t work with a valid key either).

None of my href links work when this javascript is included in iOS. It runs perfectly fine in any desktop browser, but once deployed to device or simulator no links work.

Any ideas why this is happening?

Also, this problem seems to correct itself if there is no internet connection (turn off data and wifi).

I also seem to be getting this error in the console periodically after loading:

purgeIdleCellConnections: found one to purge conn = 0x1f599320

I figured it out.

For some reason, you need to load the google map api script BEFORE cordova.js

<script src='https://maps.googleapis.com/maps/api/js?sensor=true'></script>

<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>

I had it after, and for some reason that broke the links in the iOS.

Hope this helps someone.

1 Like