You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Rachita Mathur (JIRA)" <ji...@apache.org> on 2016/10/27 04:27:58 UTC

[jira] [Comment Edited] (CB-12065) How to get latitude and longitude with ionic framework in Android

    [ https://issues.apache.org/jira/browse/CB-12065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15610619#comment-15610619 ] 

Rachita Mathur edited comment on CB-12065 at 10/27/16 4:27 AM:
---------------------------------------------------------------

yes we have installed cordova-plugin-geolocation

On Thu, Oct 27, 2016 at 5:26 AM, jcesarmobile (JIRA) <ji...@apache.org>




was (Author: rachita92):
yes we have install cordova-plugin-geolocation

On Thu, Oct 27, 2016 at 5:26 AM, jcesarmobile (JIRA) <ji...@apache.org>



> How to get latitude and longitude with ionic framework in Android
> -----------------------------------------------------------------
>
>                 Key: CB-12065
>                 URL: https://issues.apache.org/jira/browse/CB-12065
>             Project: Apache Cordova
>          Issue Type: Bug
>            Reporter: Rachita Mathur
>
> Hi Team
> I am not able to fetch latitude longitude in android using the below code.
> The code is working fine for IOS.
> var options = { timeout: 3000, enableHighAccuracy: true };
> document.addEventListener('deviceready', function () {
>     navigator.geolocation.getCurrentPosition(onSuccess, onError, options);
> });
> function onSuccess(position) 
> {
>     latvalue = position.coords.latitude;
>     lngvalue = position.coords.longitude;
>     timestamp = position.timestamp;
>     alert(latvalue);
> }
> function onError(error)
> {
>     alert(error);
> }
> Please suggest what need to be done.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org