You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Drew Walters <de...@gmail.com> on 2012/02/22 22:44:55 UTC
Geolocation override (content for README, doc update)
Prior to cordova-js the end user could override the native browser
implementation of navigator.geolocation with:
Geolocation.usePhoneGap()
It appears to me that the way to do that with cordova-js would be:
navigator.geolocation = require('cordova/plugin/geolocation');
Is that correct? If so, we need to update docs.
Do we have a location where we are keeping track of migration issues
from 1.4 -> 1.5?
Re: Geolocation override (content for README, doc update)
Posted by Drew Walters <de...@gmail.com>.
Thanks, I'll take a look at the docs Shaz has created.
On Wed, Feb 22, 2012 at 4:16 PM, Filip Maj <fi...@adobe.com> wrote:
> Shaz has kept a bunch of docs under the guide/ directory of the ios repo.
> In there he has upgrade guides to 1.5 for plugins and for regular
> projects. WE could follow that approach.
>
> And yeah, moving forward the cordova-js approach of "forcing" the use of a
> cordova plugin would be to use require syntax. You don't have to
> explicitly assign it to any global variable, I.e. You can do:
>
> require('cordova/plugin/geolocation').getCurrentPosition, or
> require('cordova/plugin/geolocation').watchPosition
>
>
> Etc.
>
> Does that answer your q ?
>
> On 12-02-22 1:44 PM, "Drew Walters" <de...@gmail.com> wrote:
>
>>Prior to cordova-js the end user could override the native browser
>>implementation of navigator.geolocation with:
>>
>> Geolocation.usePhoneGap()
>>
>>It appears to me that the way to do that with cordova-js would be:
>>
>> navigator.geolocation = require('cordova/plugin/geolocation');
>>
>>Is that correct? If so, we need to update docs.
>>
>>Do we have a location where we are keeping track of migration issues
>>from 1.4 -> 1.5?
>
Re: Geolocation override (content for README, doc update)
Posted by Filip Maj <fi...@adobe.com>.
Shaz has kept a bunch of docs under the guide/ directory of the ios repo.
In there he has upgrade guides to 1.5 for plugins and for regular
projects. WE could follow that approach.
And yeah, moving forward the cordova-js approach of "forcing" the use of a
cordova plugin would be to use require syntax. You don't have to
explicitly assign it to any global variable, I.e. You can do:
require('cordova/plugin/geolocation').getCurrentPosition, or
require('cordova/plugin/geolocation').watchPosition
Etc.
Does that answer your q ?
On 12-02-22 1:44 PM, "Drew Walters" <de...@gmail.com> wrote:
>Prior to cordova-js the end user could override the native browser
>implementation of navigator.geolocation with:
>
> Geolocation.usePhoneGap()
>
>It appears to me that the way to do that with cordova-js would be:
>
> navigator.geolocation = require('cordova/plugin/geolocation');
>
>Is that correct? If so, we need to update docs.
>
>Do we have a location where we are keeping track of migration issues
>from 1.4 -> 1.5?