Problem with geolocation

Hello,
I’m having trouble fetching the location of a device.
I already tried to use

Navigator.geolocation.getCurrentPosition
$ CordovaGeolocation.getCurrentPosition

Error message that returns

PositionError
Code: 2
Message: “Network location provider at ‘https://www.googleapis.com/’: Returned error code 400.”

But none of them are working (it was working but stopped), I searched the web and Google blocked calls to this API that are not safe environments, but I do not know how to do it in Ionic with this

Anyone have any idea what I can do to solve it?

Thank you
Diego

Have you set up the API Key properly in index.html

 <script src="http://maps.google.com/maps/api/js?key=YOUR_API_KEY_GOES_HERE&sensor=true"></script>

Hello I tried this way and it did not work either.
To solve the problem I installed the crosswalk