(This answer addresses the comments of John Barça’s comments… a little too large to put into the comments section).
Again, I got this to work using PhoneGap, but I should perhaps clarify things a little bit.
2) I did not use the geolocation functions from PhoneGap but the Geolocation API in general. If you look at the details then you realize that the former is built on the latter anyways, and even the syntax looks quite similar. But generally, going the “normal” route without even looking into the PhoneGap docs works fine. If in the options object you set enableHighAccuracy to true then it will always look for the best possible way to locate the device, which, if available, is GPS. So make sure that setting is set to true (look at the link I provided and navigate to Fine tuning response). Otherwise it might look for quicker but less accurate ways to locate you (e.g., IP address, wifi triangulation, etc.), which will not work either way if you are using your app offline.
3) (this point is more of a heads up, but not entirely linked to the response) As the app should work offline you also have to find a way to get to display an offline map. If you are using PhoneGap Build then it is important that you keep the 50 MB limit in mind! Tilesets can get very large very quickly (especially if you enable the zoom levels that show the most detail)! If your area is quite small then that would be of no concern you, but if you are looking at providing tiles for anything bigger than a city, then you would almost surely hit the limit. Your options then could be to let the user cache a map when online, and use it when offline (such as the Google Maps app lets you do it), or you could add some code to your app that pulls the tiles from a specific folder on your device, and then after the app has been installed you would have to drop your tiles in that exact folder, so they can be retrieved. You could do that using PhoneGap’s File API. I have not implemented either of those options yet, but my workmate and I will be looking into them soon, as it would be awesome to benefit from the simplicity of using PhoneGap Build, but still be able to load huge tilesets.