get location using cordova api