Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8675] Android: Clicking on pin displayed over a MapView causes a crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-27T16:55:08.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-09 API
ComponentsAndroid
Labelsapi, qe-and040912
ReporterShyam Bhadauria
AssigneeJosh Roesslein
Created2012-04-11T01:23:26.000+0000
Updated2012-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

FileDateSize
MapAndroid-2012-04-11-131006.png2012-04-11T01:23:26.000+000027299
MapTitleSubtitleLog.txt2012-04-11T01:23:26.000+00002912

Comments

  1. Josh Roesslein 2012-04-26

    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();
       
  2. Josh Roesslein 2012-04-26

    Sent [PR #2078](https://github.com/appcelerator/titanium_mobile/pull/2078) to address issue.
  3. Shyam Bhadauria 2012-06-07

    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

JSON Source