Skip to content

Commit

Permalink
fixed issue with asset location
Browse files Browse the repository at this point in the history
  • Loading branch information
omorandi committed Nov 17, 2012
1 parent 42bda7b commit 676e274
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ALTestapp/Resources/single_asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ exports.getFirstAsset = function() {
Ti.API.info('SINGLE_ASSET: Got ' + assetsList.assetsCount + ' assets');
//let's consider the first asset
var asset = assetsList.getAssetAtIndex(0);
var location = asset.location;

Ti.API.info('location: ' + JSON.stringify(location));

//let's consider only the default representation
var rep = asset.defaultRepresentation;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Classes/Asset.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ -(NSDictionary*)location
NSDictionary *loc = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithDouble:assetLocation.coordinate.latitude], @"latitude",
[NSNumber numberWithDouble:assetLocation.coordinate.longitude], @"longitude",
[NSNumber numberWithDouble:assetLocation.altitude], nil];
[NSNumber numberWithDouble:assetLocation.altitude], @"altitude", nil];
return loc;
}

Expand Down
Binary file modified ti.assetslibrary-iphone-0.2.zip
Binary file not shown.

0 comments on commit 676e274

Please sign in to comment.