Problem with geolocation

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

$ CordovaGeolocation.getCurrentPosition

Error message that returns

Code: 2
Message: “Network location provider at ‘’: 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

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

 <script src=""></script>

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