[TIMOB-14690] BlackBerry: Implement Ti.GeoLocation.getCurrentPosition
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-08-12T18:09:39.000+0000 |
| Affected Version/s | Release 3.1.1 |
| Fix Version/s | 2013 Sprint 16, 2013 Sprint 16 API, Release 3.2.0 |
| Components | BlackBerry |
| Labels | qe-closed-3.2.0, qe-testadded |
| Reporter | Martin Williamson |
| Assignee | Pedro Enrique |
| Created | 2013-07-29T13:51:05.000+0000 |
| Updated | 2014-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'
It probably isn't implemented yet.
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. ;)
PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/157
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: BoldTypo on the test code. Try this:
Ti.Geolocation.getCurrentPosition(function(e) { alert('lat: ' + e.coords.latitude); });To test add to tiapp.xml
app.js<blackberry> <permissions> <permission>access_internet</permission> <permission>access_location_services</permission> </permissions> </blackberry>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-crvar win = Ti.UI.createWindow(); win.open(); Ti.Geolocation.getCurrentPosition(function(e) { alert('lat:' + e.coords.latitude); });