Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19280] iOS: MAP Click event not returning clicksource properly

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2015-08-13T03:08:29.000+0000
Affected Version/sRelease 4.0.0, Release 4.1.0
Fix Version/sn/a
ComponentsiOS
Labelsannotation, map, mapview
ReporterRay Belisle
AssigneeEric Merriman
Created2015-07-29T15:22:46.000+0000
Updated2017-03-22T23:07:12.000+0000

Description

Using the same code on 3.5.1 and 4.0,4.1 In 3.5.1 the annotation clicksource reports properly (leftpane, rightpane, pin, etc) the same code on 4.0 or 4.1 does not report any of the annotation clicksource options, only 'pin'. Once the annotation is highlighted, clicking on any part of the annotation callout does NOT fire the click event.

Comments

  1. Ray Belisle 2015-07-29

    BTW, here is code to show/test:
       var MapModule = require('ti.map');
       var win = Ti.UI.createWindow({
       	backgroundColor : 'white'
       });
       var opera = MapModule.createAnnotation({
       	latitude : -33.8569,
       	longitude : 151.2153,
       	centerOffset : {
       		x : 80,
       		y : 25
       	},
       	image : 'SydneyOperaHouse.jpg',
       	title : 'Sydney Opera House',
       	subtitle : 'Sydney, New South Wales, Australia',
       	// For eventing, use the Map View's click event
       	// and monitor the clicksource property for 'rightButton'.
       	rightButton : Ti.UI.iPhone.SystemButton.CONTACT_ADD
       });
       var bridge = MapModule.createAnnotation({
       	latitude : -33.852222,
       	longitude : 151.210556,
       	pincolor : MapModule.ANNOTATION_PURPLE,
       	title : 'Sydney Harbour Bridge',
       	subtitle : 'Port Jackson',
       	// For eventing, use the Map View's click event
       	// and monitor the clicksource property for 'leftButton'.
       	leftButton : Ti.UI.iPhone.SystemButton.INFO_DARK
       });
       var mapview = MapModule.createView({
       	mapType : MapModule.NORMAL_TYPE,
       	region : {
       		latitude : -33.87365,
       		longitude : 151.20689,
       		latitudeDelta : 0.1,
       		longitudeDelta : 0.1
       	},
       	annotations : [bridge, opera]
       });
       
       mapview.addEventListener('click', clicked);
       
       win.add(mapview);
       win.open();
       
       function clicked(evt) {
       	Ti.API.info(evt.clicksource);
       	Ti.API.info(JSON.stringify(evt));
       }
       
  2. Kon Lovett 2015-07-30

    Problem seems to be in the iPhone 2.3.1 ti.map module. When we build with 4.1.0 SDK & the 2.2.2 module, or Android, the problem doesn't occur. But 4.1.0 SDK & 2.3.1 module does exhibit the above issue.
  3. Chee Kiat Ng 2015-08-13

  4. Lee Morris 2017-03-22

    Closing ticket as duplicate as the relevant ticket is linked above.

JSON Source