Titanium JIRA Archive
Appcelerator Community (AC)

[AC-239] iOS map click event fires only if clicksourse is "pin"

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-11-11T05:20:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsios, mapView, module
ReporterGeorgi Nikolov
AssigneeShak Hossain
Created2015-07-17T09:40:44.000+0000
Updated2015-11-11T05:20:35.000+0000

Description

That are parts of my code which do not works after update to Titanium CLI version 4.0.1 Currently click event only fires if e.clicksourse is "pin" but i need to fire if clicksourse is "rightButton" which works before update in the Alloy xml view: in Alloy controller: function doClick(e){ Ti.API.info("doClick: " + e.clicksource); }

Comments

  1. Hans Knöchel 2015-09-02

    Please retry using the latest Ti.Map version, thank you!
  2. Papia Chowdhury 2015-09-14

    Hello, I have tested this issue in my environment. Click event for rightButton works as expected. *Testing Environment:* Appcelerator Studio, build: 4.3.0.201509031836 Appcelerator Command-Line Interface, version 5.0.0-50 Titanium SDK: 4.1.1 GA, 4.1.0GA, 4.0.0GA iOS simulator: iphone 5s(v8.1) OS X version: 10.9.5 *Steps to test* 1. Create an alloy project. 2. Replace index.xml and index.js with following code 3. Run the project Now click on the left and right button of the map and observe the output for the clicksource in the console. *Test Case:* index.xml
       <Alloy>
       	<Window>
       		<View id="mapview" module="ti.map">
               </View>
       	</Window>
       </Alloy>
       
    index.js
       Ti.Map = require("ti.map");
       
       var annotation = Ti.Map.createAnnotation({
       	latitude : "37.322998",
       	longitude : "-122.032182",
       	title : "Map Test",
       	subtitle : "",
       	leftButton : Titanium.UI.iPhone.SystemButton.DISCLOSURE,
       	rightButton : Titanium.UI.iPhone.SystemButton.DISCLOSURE,
       });
       $.mapview.addAnnotation(annotation);
       
       $.mapview.region = {
       	latitude : "37.322998",
       	longitude : "-122.032182",
       	latitudeDelta : 0.3,
       	longitudeDelta : 0.3
       };
       
       $.mapview.selectAnnotation(annotation);
       $.mapview.addEventListener("click", function(e) {
       	console.log("click", e.clicksource);
       });
       $.index.open();
       
    Thanks.

JSON Source