Google Maps not loading on device

I’ve been trying to implement maps inside my app and I’ve tried a few different examples such as this one http://codepen.io/ionic/pen/uzngt

They run fine in the browser with ionic serve, however they do not load on any of my devices iOS and Android (latest software releases for each). Any one else experiencing the same issues?

I believe the sources for script and link must start with either http or https since they are not running on a server but locally.

Have you inspected the device using Chrome Developer Tools for Android and Safari for iOS?

I am also trying to use google map javascript in ionic…its works fine for browser not loading in device
I tried with different script url. but no luck.
Failed to load resource: the server responded with a status of 404 (Not Found) https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false

Failed to load resource: net::ERR_FILE_NOT_FOUND file://maps.googleapis.com/maps/api/js?sensor=true

any help would be appriciated

Maybe

If you’re using a newer version of Cordova (or the latest Ionic CLI) to develop your app, you may be experiencing http 404 errors when your app tries to make network requests.

This can be solved quickly with the Cordova whitelist plugin! To install it, just run the following in your project’s directory:

Go to Ionic docs