Navigator geolocation getCurrentPosition work/not work

Problem is easily solvable if you:

I. Wrap your geolocation code in device ready event
II. Use Cordova Whitelist plugin

Find more about it in another forum post: