Getcurrentposition() and watchposition() no longer work on insecure origins

My application makes use of google maps to show the current location, and therefore it is necessary to know the geographic coordinates. Since these functions no longer serve with ionic that for what I was checking works under the protocol http and not https, what alternative there are for those who already have our app working but due to this update no longer the geolocation? It is necessary to obtain the geographic coordinates, but how?