[TIMOB-7308] Android: Implement subtitleid and titleid properties for Ti.Map.Annotation
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-08T12:44:16.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API |
Components | Android |
Labels | api, parity, qe-and011912, qe-testadded |
Reporter | Dustin Hyde |
Assignee | Josh Roesslein |
Created | 2012-01-19T18:11:41.000+0000 |
Updated | 2012-06-11T14:10:59.000+0000 |
Description
subtitleid and titleid properties not displayed by annotation, just a null string.
Steps to Reproduce:
1. Run Code:
var win1 = Titanium.UI.createWindow({
title:'id:string',
backgroundColor:'#fff'
});
var defaultPin1 = Titanium.Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
titleid:'title',
subtitleid:'subtitle',
animate:true,
myid:3,
pincolor:Titanium.Map.ANNOTATION_GREEN
});
var mapview1 = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:37.337681,longitude:-122.038193, latitudeDelta:1, longitudeDelta:2},
animate:true,
regionFit:true,
userLocation:false,
annotations:[defaultPin1]
});
// Test updating the locale properties.
mapview1.addEventListener('click', function() {
setTimeout(function() {
defaultPin1.titleid = "title2";
defaultPin1.subtitle = "Updated!";
}, 3000);
});
win1.add(mapview1);
win1.open();
2. Click Annotation.
Expected Result:
Annotation strings should display.
After three seconds both the title and subtitle should get updated.
Note: the annotation will disappear, just click it again to make it visible.
This is a known Android bug and will be fixed in the future.
Actual Result:
Null strings display. Screenshot Attached.
Note: The standard string values in the sample code do not work, nor do the localization strings from the related ios bug work (L('') or '' (shorthand)).
Attachments
File | Date | Size |
---|---|---|
device-2012-01-19-180642.png | 2012-01-19T18:11:41.000+0000 | 275127 |
Marking this as new feature. Documentation clearly states that titleid and subtitleid are properties supported by IOS only
Updated test case to verify property changes work. Make sure to add "title2" to your locale file.
[PR #2345](https://github.com/appcelerator/titanium_mobile/pull/2345) to resolve issue.
Closing as Fixed. SDK: 2.1.0.v20120608174150 Studio: 2.1.0.201206081630 OS: Snow Leopard Devices Tested: Nexus One 2.2.2, Galaxy Nexus 4.0.3