this the plugin https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-geolocation/ if app doenot work in you phone change this in index.html: create ane key to google api :
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBlgRIj0KXiA3ds2chh6QzT8Kcjz_9_GfO5s&sensor=true"></script>don't use this key create your own key https://developers.google.com/maps/documentation/javascript/get-api-key