[TIMOB-8675] Android: Clicking on pin displayed over a MapView causes a crash
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-04-27T16:55:08.000+0000 |
| Affected Version/s | Release 2.0.1 |
| Fix Version/s | Release 2.1.0, Sprint 2012-09 API |
| Components | Android |
| Labels | api, qe-and040912 |
| Reporter | Shyam Bhadauria |
| Assignee | Josh Roesslein |
| Created | 2012-04-11T01:23:26.000+0000 |
| Updated | 2012-06-07T07:11:37.000+0000 |
Description
Test steps
1. Launch app (use updated test case in comments as well)
2. Click on pin
Expected result
An annotation should appear above the pin that says: "My Title. My Subtitle"
Actual result
On clicking on the pin, the app crashes and exits.
Screenshot and logs are attached and app.js is given below.
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
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
//pincolor:Titanium.Map.ANNOTATION_GREEN
});
var mapview = 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:[Ti_ann_defaultPin]
});
win.add(mapview);
win.open();
Attachments
| File | Date | Size |
|---|---|---|
| MapAndroid-2012-04-11-131006.png | 2012-04-11T01:23:26.000+0000 | 27299 |
| MapTitleSubtitleLog.txt | 2012-04-11T01:23:26.000+0000 | 2912 |
Here's an updated test case more friendly for Android:
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); var Ti_ann_defaultPin = Titanium.Map.createAnnotation({ latitude:37.390749, longitude:-122.081651, title: 'Pot of gold here!', subtitle: 'Property of Josh', animate:true }); var mapview = Titanium.Map.createView({ mapType: Titanium.Map.STANDARD_TYPE, region: { latitude:37.337681, longitude:-122.038193, }, animate:true, regionFit:true, userLocation:false, annotations:[Ti_ann_defaultPin] }); win.add(mapview); win.open();Sent [PR #2078](https://github.com/appcelerator/titanium_mobile/pull/2078) to address issue.
Environment information Tested with Titanium SDK: 2.1.0.v20120606165259 Tested with Titanium Studio: 2.1.0.201206051612 Device: Android 2.2 and 4.0 Android Runtime: V8