Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9020] MobileWeb: Not able to click MapView annotations when having more than one

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-20T10:59:11.000+0000
Affected Version/sRelease 2.1.0, Release 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-10 MW
ComponentsMobileWeb
LabelsSupportTeam, qe-port
ReporterEduardo Gomez
AssigneeChris Barber
Created2012-05-07T14:49:49.000+0000
Updated2012-08-08T16:24:15.000+0000

Description

Issue

Having more than one annotation caused issues with MobileWeb.

Steps to reproduce

1. Throw sample below to an MobileWeb project 2. Click one annotation on the map view (only one is clickable) 3. The others won't capture any click events (Notice if you run this sample over again, clicking other annotation remaining ones won't capture any click event).

Expected behavior

Each Annotation capture click events

Repro sequence

var win1 = Titanium.UI.createWindow({
	title : 'Tab 1',
	backgroundColor : '#fff'
});

var mountainView = Titanium.Map.createAnnotation({ 
	latitude:37.7819496, longitude:-122.4945521, 
	title:"Appcelerator Headquarters1", subtitle:'Mountain2 View, CA', 
	pincolor:Titanium.Map.ANNOTATION_RED, animate:true, 
	leftButton: '../images/appcelerator_small.png', myid:1 
	// Custom property to uniquely identify this annotation. 
	}); 
	
var mountainView2 = Titanium.Map.createAnnotation({ 
	latitude:37.7907269, longitude:-122.4588735, 
	title:"Appcelerator Headquarters2", subtitle:'Mountain View, CA', 
	pincolor:Titanium.Map.ANNOTATION_RED, animate:true, 
	leftButton: '../images/appcelerator_small.png', myid:2 
	// Custom property to uniquely identify this annotation. 
	}); 
	
var mountainView3 = Titanium.Map.createAnnotation({ 
	latitude:37.7878780, longitude:-122.4111750, 
	title:"Appcelerator Headquarters3", subtitle:'Mountain View, CA', 
	pincolor:Titanium.Map.ANNOTATION_RED, animate:true, 
	leftButton: '../images/appcelerator_small.png', myid:3 
// Custom property to uniquely identify this annotation. 
});

var mapview = Titanium.Map.createView({
	mapType : Titanium.Map.STANDARD_TYPE,
	region : {
		latitude : 37.78583526611328,
		longitude : -122.40641784667969,
		latitudeDelta : 0.03,
		longitudeDelta : 0.03
	},
	animate : true,
	regionFit : true,
	userLocation : true,
	annotations : [mountainView, mountainView2, mountainView3]
});

win1.add(mapview);

win1.open(); 

Attachments

FileDateSize
Archive.zip2012-05-19T17:40:48.000+00003122596
MW_MapView_2.0.1.GA2.jpg2012-05-07T14:49:49.000+0000162586

Comments

  1. Chris Barber 2012-05-07

    Confirmed this is indeed a bug. :(
  2. Chris Barber 2012-05-19

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/2234

JSON Source