Geolocation is one of those rare APIs that does what it was made for very simply and with a minimum of fuss; it's a very succinct API. There's also another benefit: as a W3C standard, many browsers have implemented it and it isn't specific to Cordova/PhoneGap.
What Cordova/PhoneGap does offer, however, is akin to a polyfill. If the browser implementation being used does not support geolocation, then Cordova/PhoneGap will provide its own implementation. As such, what works on one platform can work on many different platforms, including desktop browsers.
The API documentation can be found at https://github.com/apache/cordova-plugin-geolocation/blob/dev/doc/index.md.
Before you use the geolocation features, be sure ...