Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0323B1801A for ; Mon, 4 Jan 2016 08:05:41 +0000 (UTC) Received: (qmail 2804 invoked by uid 500); 4 Jan 2016 08:05:40 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 2770 invoked by uid 500); 4 Jan 2016 08:05:40 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 2460 invoked by uid 99); 4 Jan 2016 08:05:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2016 08:05:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 838CC2C1F5C for ; Mon, 4 Jan 2016 08:05:40 +0000 (UTC) Date: Mon, 4 Jan 2016 08:05:40 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10204) Fix getCurrentPosition options on Android MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-10204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15080799#comment-15080799 ] ASF GitHub Bot commented on CB-10204: ------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-geolocation/pull/60 > Fix getCurrentPosition options on Android > ----------------------------------------- > > Key: CB-10204 > URL: https://issues.apache.org/jira/browse/CB-10204 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Geolocation > Environment: Cordova 3.5.0, Plugin Geolocation 2.0.0 > Reporter: Timo Salola > Assignee: Sergey Grebnov > Labels: Android, Triaged > > In the latest release there was created separate JS file for android. In getCurrentPosition it does not verify that options are given resulting javascript error when trying to access undefined as an array at www/android/geolocation.js lines 33 and 34: > {code:javascript} > getCurrentPosition: function(success, error, args) { > var win = function() { > var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); > geo.getCurrentPosition(success, error, { > enableHighAccuracy: args[0], > maximumAge: args[1] > }); > }; > exec(win, error, "Geolocation", "getPermission", []); > } > {code} > Workaround this is to give empty array to getCurrentPosition as options: > {code:javascript} > navigator.geolocation.getCurrentPosition(onSuccess, onError, []); > {code} -- 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