You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by sgrebnov <gi...@git.apache.org> on 2015/12/29 10:27:31 UTC

[GitHub] cordova-plugin-geolocation pull request: CB-10277 Error callback s...

GitHub user sgrebnov opened a pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/62

    CB-10277 Error callback should be called w/ PositionError if deny location access

    https://issues.apache.org/jira/browse/CB-10277

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-geolocation CB-10277

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-geolocation/pull/62.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
    
----
commit 9fcdcfc88a17c10c701aa36f18a06a74e6fce831
Author: sgrebnov <v-...@microsoft.com>
Date:   2015-12-29T09:26:25Z

    CB-10277 Error callback should be called w/ PositionError when location access is denied

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-geolocation pull request: CB-10277 Android: error c...

Posted by sgrebnov <gi...@git.apache.org>.
Github user sgrebnov commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/62#discussion_r48600533
  
    --- Diff: www/android/geolocation.js ---
    @@ -52,7 +62,20 @@ module.exports = {
               var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
               geo.clearWatch(args[0]);
             }
    -        exec(win, error, "Geolocation", "getPermission", []);
    +        var fail = function() {
    +            if (error) {
    +                error(illegalAccessError);
    +            }
    +        };
    +        exec(win, fail, "Geolocation", "getPermission", []);
         }
     };
     
    +// mimic PositionError to be compliant with W3C spec
    +var illegalAccessError = {
    --- End diff --
    
    Currently PositionError is not available on Andoroid as we don't include that file, but I think we can include it and use it - I'll update PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-geolocation pull request: CB-10277 Android: error c...

Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/62#discussion_r48596423
  
    --- Diff: www/android/geolocation.js ---
    @@ -52,7 +62,20 @@ module.exports = {
               var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
               geo.clearWatch(args[0]);
             }
    -        exec(win, error, "Geolocation", "getPermission", []);
    +        var fail = function() {
    +            if (error) {
    +                error(illegalAccessError);
    +            }
    +        };
    +        exec(win, fail, "Geolocation", "getPermission", []);
         }
     };
     
    +// mimic PositionError to be compliant with W3C spec
    +var illegalAccessError = {
    --- End diff --
    
    Insead of creating custom object, can we reuse [PositionError polyfill](https://github.com/apache/cordova-plugin-geolocation/blob/master/www/PositionError.js) here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-geolocation pull request: CB-10277 Android: error c...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-geolocation/pull/62


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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