Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18624] iOS Map Kit pinchangedragstate Event not firing after enabling Test services

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2015-11-09T19:20:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterEduardo Gomez
AssigneeChee Kiat Ng
Created2015-02-27T17:15:43.000+0000
Updated2015-11-09T19:20:24.000+0000

Description

Issue Description

Using pins on a map (Ti.Map) an event wired up to the PinChangeDragState event. When we enable either the test service or the performance services built in to Appcelerator Studio, the event no longer fires. If the client disables those services, the event fires again as expected.

Expected Behaviour

pinchangedragstate - event fires when the pin's drag state changes

Actual Behaviour

pinchangedragstate - event no longer fires

Module Combos

From our tests these are the different outcomes when Services were enabled: - With APM/SOASTA event not fired - With SOASTA events not fired - With APM event is fired

Sample Code

As example, get following map code to interact with it and notice outputs information to the console when each event fires: http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Map_Kit-section-37540542_iOSMapKit-EventHandling

var win = Titanium.UI.createWindow({
	backgroundColor : 'white',
	layout : "vertical"
});

var MapModule = require('ti.map');

var mapContainer = Titanium.UI.createView({
	top : 5,
	width : Ti.UI.FILL,
	height : Ti.UI.FILL
});
var appc = MapModule.createAnnotation({
	latitude : 37.389569,
	longitude : -122.050212,
	title : 'Appcelerator HQ',
	subtitle : 'Mountain View, CA',
	pincolor : MapModule.ANNOTATION_GREEN,
	draggable : true
});
var mapview = MapModule.createView({
	mapType : MapModule.HYBRID_TYPE,
	region : {
		latitude : 37.389569,
		longitude : -122.050212,
		latitudeDelta : 0.2,
		longitudeDelta : 0.2
	},
	annotations : [appc]
});
mapview.addEventListener('pinchangedragstate', function(e) {
	Ti.API.info(e.type);
	var state = '';
	switch (e.newState) {
	case MapModule.ANNOTATION_DRAG_STATE_END:
		state = "ANNOTATION_DRAG_STATE_END";
		break;
	case MapModule.ANNOTATION_DRAG_STATE_START:
		state = "ANNOTATION_DRAG_STATE_START";
		break;
	default :
		state = "unknown state: " + e.newState;
		break;
	}
	Ti.API.info(JSON.stringify(state));
	Ti.API.info(JSON.stringify(e.newState));
});
mapview.addEventListener('click', function(e) {
	Ti.API.info(e.type);
	Ti.API.info(JSON.stringify(e.clicksource));
});
mapview.addEventListener('regionchanged', function(e) {
	Ti.API.info(e.type);
	Ti.API.info(e.latitude + "," + e.longitude);
});

mapContainer.add(mapview);
win.add(mapContainer);

win.open();

App running with no services

[INFO] :   click
[INFO] :   "pin"
[INFO] :   complete
[INFO] :   click
[INFO] :   null
[INFO] :   pinchangedragstate
[INFO] :   "ANNOTATION_DRAG_STATE_START"
[INFO] :   pinchangedragstate
[INFO] :   "unknown state: 2"
[INFO] :   pinchangedragstate
[INFO] :   "ANNOTATION_DRAG_STATE_END"
[INFO] :   pinchangedragstate
[INFO] :   "unknown state: 0"
[INFO] :   click
[INFO] :   "pin"

This is soasta/apm

[INFO] :   regionchanged
[INFO] :   37.38956832885742,-122.05020904541016
[INFO] :   complete
[INFO] :   complete
[INFO] :   complete
[INFO] :   complete
[INFO] :   complete
[INFO] :   click
[INFO] :   "pin"
[INFO] :   click
[INFO] :   null
[INFO] :   click
[INFO] :   "pin"

Comments

  1. Eduardo Gomez 2015-02-27

    SOASTA CSM Request #1455

    iOS Map Kit pinchangedragstate Event not firing after enabling Test services https://soasta.zendesk.com/requests/1455
  2. Hans Knöchel 2015-11-09

    [~egomez]: We fixed some drag and drop issues on Ti.Map a few months ago, can you verify that?
  3. Eduardo Gomez 2015-11-09

    [~hansknoechel] I have not had any issues lately thus this should not be an issue anymore. Assuming SOASTA version affected the Ti.Map events that does not seem to occur with latest either. Feel free to resolve as applicable. Thanks for the heads up.

JSON Source