Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7308] Android: Implement subtitleid and titleid properties for Ti.Map.Annotation

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-08T12:44:16.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 API
ComponentsAndroid
Labelsapi, parity, qe-and011912, qe-testadded
ReporterDustin Hyde
AssigneeJosh Roesslein
Created2012-01-19T18:11:41.000+0000
Updated2012-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

FileDateSize
device-2012-01-19-180642.png2012-01-19T18:11:41.000+0000275127

Comments

  1. Vishal Duggal 2012-06-06

    Marking this as new feature. Documentation clearly states that titleid and subtitleid are properties supported by IOS only
  2. Josh Roesslein 2012-06-06

    Updated test case to verify property changes work. Make sure to add "title2" to your locale file.
  3. Josh Roesslein 2012-06-06

    [PR #2345](https://github.com/appcelerator/titanium_mobile/pull/2345) to resolve issue.
  4. Dustin Hyde 2012-06-11

    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

JSON Source