[MOD-2194] Ti.Map: iOS event for regionwillchange
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-01-21T11:49:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | Map |
Labels | ios, qe-5.4.0, ti.map |
Reporter | Joseph Sachs |
Assignee | Hans Knöchel |
Created | 2016-01-26T12:53:17.000+0000 |
Updated | 2017-01-21T11:49:42.000+0000 |
Description
It would be nice to implement this event trigger on iOS:
// regionwillchange to be triggered before the existing regionchanged event in Ti
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated
We do have regionDidChangeAnimated in ti.map for iOS & Android, however regionWillChangeAnimated is just as good to have :)
Valid feature request, submitted via Github issue.
*PR*: https://github.com/appcelerator-modules/ti.map/pull/146 *Test*: Use the below code and drag the map view. *Expected behavior*: Start dragging and the
regionwillchange
event gets fired. Stop dragging and theregionchanged
event gets fired.Verified as fixed, When dragging the map view, "Region will change no!" warning is shown in the console. along with an object obtaining the current position. "Region did change!" event does not fire until dragging is stopped, which returns an object obtaining the new position. Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Ti.Map (2.7.1) Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160712013704 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-31 Xcode 7.3 Node v4.4.7 *Closing ticket.*