Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5397] iOS: subtitleid and titleid properties for Ti.Map.Annotation do not work

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T21:23:21.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-44, Sprint 2011-46, Release 1.8.0.1
ComponentsiOS
Labelsmodule_map, qe-testadded
ReporterJon Alter
AssigneeSabil Rahim
Created2011-09-30T16:16:00.000+0000
Updated2014-06-19T12:46:12.000+0000

Description

Documentation says that subtitleid and titleid can be use to reference the key in the locale file. It does not work as expected. http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.Annotation-object

Repro Steps

Step 1: put the code from the example strings.xml file below in "/i18n/en/strings.xml" (make the strings.xml file and folders if necessary) Step 2: run the example code below Step 3: click on the anotation Step 4: notice that subtitle does not show
var win = Ti.UI.createWindow({
  backgroundColor:"#fff",
  title:"My App"
});
win.open();

var Ti_ann_defaultPin = Titanium.Map.createAnnotation({
	latitude:37.390749,
	longitude:-122.081651,
	title:L('title'),
	// subtitle:L('subtitle'),
	// titleid:"title",
	subtitleid:'subtitle',
	animate:true,
	myid:3 // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS
});

var mapview = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    region: {latitude:37.337681,longitude:-122.038193, latitudeDelta:0.01, longitudeDelta:0.01},
    animate:true,
    regionFit:true,
    userLocation:true,
    annotations:[Ti_ann_defaultPin]
});
 win.add(mapview);
<?xml version="1.0" encoding="UTF-8"?>
<resources>
        <string name="title">My Title.</string>
        <string name="subtitle">My Subtitle</string>
</resources>

Workaround

use title:L('title') instead of titleid:"title"

Associated Helpdesk Ticket

http://appc.me/c/APP-589719

Comments

  1. Sabil Rahim 2011-11-07

    pull pending #643
  2. Reggie Seagraves 2011-11-15

    Please clean up the build warnings.
  3. Dustin Hyde 2011-12-12

    Bug fixed. Verified on: SDK: 1.8.0.1.v20111212014614 Studio: 1.0.7.201112120322 OS: OS X Lion Devices Tested: iPhone/iPad Simulator 4.3
  4. Dustin Hyde 2011-12-12

    Added label qe-port.
  5. Wilson Luu 2012-01-05

    Reopening issue to add tag

JSON Source