Titanium JIRA Archive
Appcelerator Community (AC)

[AC-307] Click event on annotation does not work in ti.map module

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-11-12T11:53:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
Reporterrobin
AssigneeMostafizur Rahman
Created2015-08-20T13:36:33.000+0000
Updated2015-11-12T11:53:16.000+0000

Description

When using the Titanium map module in iOS 8 (it probably happens in earlier versions too), click events don't fire for annotation popups. The view's click event fires when you tap the pin itself, but once you tap it and reveal the popup (with title, subtitle, left/right buttons etc), no touch events fire for that popup. This makes the map useless as you can imagine, as you lose the 'list-detail' relationship, and it's not practical to open a detail view when you tap the pin; you need to know what you're tapping first.

Comments

  1. robin 2015-08-21

    Please write any solution for this problem.
  2. Jebun Naher 2015-11-12

    Hello, We couldn't reproduce this issue as a bug in our environment. Click event on annotation works as expected. *Testing Environment:* Appcelerator Command-Line Interface, version 5.0.4 Appcelerator Studio, build: 4.3.3.201510212245 Ti SDK Version :5.0.2.GA Node.js Version :0.10.37 Mac OS X,Version :10.10.1 Jdk version : 1.7.0_80.jdk simulator : iPhone 6(8.2) [Screenshot](http://postimg.org/image/42142jeuz/) *Steps to Test:* 1. Run below code 2. Click on annotation to test *Test Case:*
       var Map = require('ti.map');
       var win = Titanium.UI.createWindow();
       var mountainView = Map.createAnnotation({
       	latitude : 37.390749,
       	longitude : -122.081651,
       	title : "Appcelerator Headquarters",
       	subtitle : 'Mountain View, CA',
       	rightButton : Titanium.UI.iPhone.SystemButton.INFO_LIGHT,
       	leftButton : Titanium.UI.iPhone.SystemButton.DISCLOSURE,
       	myid : 1
       });
        
       var mapview = Map.createView({
       	mapType : Map.STANDARD_TYPE,
       	region : {
       		latitude : 37.390749,
       		longitude : -122.081651,
       		latitudeDelta : 0.01,
       		longitudeDelta : 0.01
       	},
       	animate : true,
       	regionFit : true,
       	userLocation : true,
       	annotations : [mountainView]
       });
       win.add(mapview);
       // Click Event
       mapview.addEventListener('click', function(evt) {
       	var clicksource = evt.clicksource;
               alert(clicksource);
       });
       win.open();
       
    Thanks.

JSON Source