Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14690] BlackBerry: Implement Ti.GeoLocation.getCurrentPosition

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-12T18:09:39.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API, Release 3.2.0
ComponentsBlackBerry
Labelsqe-closed-3.2.0, qe-testadded
ReporterMartin Williamson
AssigneePedro Enrique
Created2013-07-29T13:51:05.000+0000
Updated2014-06-19T12:44:12.000+0000

Description

Using
Ti.Geoloation.getCurrentPosition(function(e) {
	alert('lat:' + e.coords.latitude);
});
Gives
TypeError: Object [object Object] has no method 'getCurrentPosition'

Comments

  1. Daniel Sefton 2013-07-29

    It probably isn't implemented yet.
  2. Pedro Enrique 2013-08-09

    Martin, This is not implemented yet, but it will be in 3.2.GA On a side note, you have a couple of syntax errors. ;)
  3. Pedro Enrique 2013-08-12

    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/157
  4. Olga Romero 2013-11-05

    Pedro, please provide a test code. Thanks.
       Info: Sending request: GET_FILE
       Info: Action: Get File
       Info: Package com.appc.bingo.testDev__appc_bingo74b69c30
       Info: Asset Path logs/log
       Info: Sending File: 269
       app.js:5
       Ti.Geoloation.getCurrentPosition(function(e) {
                     ^
       TypeError: Cannot call method 'getCurrentPosition' of undefined
           at app.js:5:15
       [N_DEBUG] virtual int NativeAbstractTextControlObject::setFont(TiObject*) Line 159: Unknown value received: Bold
       
  5. Pedro Enrique 2013-12-10

    Typo on the test code. Try this:
       Ti.Geolocation.getCurrentPosition(function(e) {
           alert('lat: ' + e.coords.latitude);
       });
       
  6. Olga Romero 2013-12-10

    To test add to tiapp.xml
        <blackberry>
           	<permissions>
           <permission>access_internet</permission>
           <permission>access_location_services</permission>
       	</permissions>
         </blackberry>
       
    app.js
       var win = Ti.UI.createWindow();
       win.open(); 
       
       
       Ti.Geolocation.getCurrentPosition(function(e) {
           alert('lat:' + e.coords.latitude);
       });
       
       
    Closing as fixed - "lat:" appears in the window. Appcelerator Studio, build: 3.2.0.201312091648 Titanium SDK, build: 3.2.0.v20131209192649 CLI 3.2.0-cr Alloy 1.3.0-cr

JSON Source