[MOD-2261] iOS ti.map pinchangedragstate event never fired.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-05-31T07:52:24.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 5.4.0 |
Components | Map |
Labels | ios, map, module, qe-5.4.0 |
Reporter | Jeff Messick |
Assignee | Hans Knöchel |
Created | 2016-03-13T21:18:17.000+0000 |
Updated | 2016-07-19T22:44:25.000+0000 |
Description
Using map module ti.map 2.7.0 crashes app when trying to drag pin on map. Map loads pin drops, holding and raging pin causes crash with no errors in console. I have also tried using older versions of the map module with same results.
Steps to reproduce:
New classic project use code from doc's http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Map_Kit
var MapModule = require('ti.map');
var win = Ti.UI.createWindow({backgroundColor: 'white'});
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);
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);
});
mapview.addEventListener('complete', function(e){
Ti.API.info(e.type);
});
win.add(mapview);
win.open();
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2016-03-14 at 9.07.51 PM.png | 2016-03-14T15:14:48.000+0000 | 840802 |
Screen Shot 2016-03-14 at 9.08.08 PM.png | 2016-03-14T15:14:53.000+0000 | 850246 |
Hello, I tried the module ti.map version 2.7.0 with SDK 5.2.0.GA. The app seems to be working as expected with iPhone simulator (9.1). Dragging map pin did not crash the app. See the screenshots to compare and see the console log for region change. *Platform Info*
Thanks.
Do you get the same results when running on an iPhone device? I have run this on the device and in the Sim. On the device I click the pin, The bubble appears, when I press and hold to drag the pin it crashes. Console Output:
In the simulator same steps as below but it does not crash but the new state return undefined.
Any Update on this?
Hello, Tested this issue using the test steps and sample code provided by the reporter. iOS ti.map *pinchangedragstate* is not firing as expected. *Test Environment:* Appcelerator Studio, build: 4.5.0.201602170821, Operating System Mac OS X -EI Capitan, Versio-10.11.1, Appcelerator Command-Line Interface, version 5.2.0, SDK Version = 5.2.0.GA , Node.js Version : 4.2.2 npm Version: 2.14.7, iOS SDK: 9.1, iPad Device, iPhone 6 Plus, ti.map-2.7.0 *Test Steps:* 1.Create an app, add ti.map module and add the sample code provided by the reporter. 2.Deploy to iPad device and simulator 3.On the device I click the pin, the bubble appears, when I press and hold to drag the pin , pinchangedragstate event is not firing. *Test Results:* *Console logs:* *Device(iPad):*
*Simulator logs(iPhone 6 Plus):*
Thanks.
Any updates?
It would be nice to have an update on this.
any solution ?
I too am running into this issue. This seems to be an issue in the Ti.Map module, when I revert back to ti.map 2.2.2 there is no longer an issue. Appcelerator Studio, build: 4.5.0.201602170831 Ti SDK 5.2.0 GA ti.map 2.5.2 & 2.7.0 iPhone Simulator 9.2 OSX 10.10.5
PR: https://github.com/appcelerator-modules/ti.map/pull/164 Ok, so here are some thoughts that took me a while to realize. First of all, I removed a type-warning back in the days that caused the issue (between 2.2.2 and 2.2.3). Casting it correctly fixes the issue because the wrong casting brook all properties after it as well. So the fix might not seem related, but please try the following packaged module to verify: [ti.map-iphone-2.7.1.zip](https://github.com/appcelerator-modules/ti.map/releases/download/untagged-4cbab7537114c27b5b2a/ti.map-iphone-2.7.1.zip) I would put it into 5.4.0 as well, but all of you guys could already use it before, since it would be published to Github after it's successful review. So please leave your feedback, thanks!
CR and FT passed! PR merged! Let's have a PR for the packaged module please :)
Verified as fixed. Tested on: iPhone 6 plus (9.1) iOS Simulator (9.3) Mac OSX El Capitan 10.11.6 Studio: 4.7.0.201607130543 Ti SDK: 5.4.0.v20160713141635 Xcode 7.3.1 Appc NPM: 4.2.7 Appc CLI: 5.4.0-33 Node v4.4.4 * Closing Ticket*