[TIMOB-1046] calling selectAnnotation on mapview outside of event listener does not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:55:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:42:26.000+0000 |
Updated | 2011-04-17T01:55:03.000+0000 |
Description
in Kitchen Sink - Base UI -> Views -> Map View
This should have been fixed by #918 but there are a couple changes I can make to the code to make it more robust (I think). Using this ticket as an excuse to go back in and clean up the original hack if possible.
From the MKMapView documentation:
Annotations do not become onscreen at least until the map view has been drawn, which only happens at the end of the JS. Updated the documentation to reflect this.
we have to figure this out. it's perfectly reasonable to want your annotation to be visible when the map is rendered
I agree that it's perfectly reasonable, but we can't do anything about the limitations of MKMapView. I would say that we could queue selections, to be selected once the map is displayed, but this does not get around the restriction that annotations must be visible on the current map display to be selected.
Okay, think I have a solution. Was a good idea to reopen this.
Alright, we can support the following:
HOWEVER, the following features will still need to be added:
These are much easier to do on the JS end than the Cocoa Touch end, so we may be able to stall on them for a while.
(from [23d0511b83365e6b3912ebbd517ca43a7dc9474f]) [#1046 state:open] First set of fixes for map view add/select including small modifications to KS to test. Second set will involve moving the visible region to a newly selected annotation. http://github.com/appcelerator/titanium_mobile/commit/23d0511b83365e6b3912ebbd517ca43a7dc9474f"> http://github.com/appcelerator/titanium_mobile/commit/23d0511b83365...
Hey, looks like the map view documentation is wrong. We can, in fact, select an annotation in the annotations list and the map automatically jumps to the right point.
However, selecting annotations that were added with addAnnotation(s) may not work. Need to take a look at the current annotation management framework as a result.
(from [3c14b2eec6b641ab53cbd43fa0aabab1161955ba]) Closes #1046: Annotation addition/removal now happens immediately, not on a delay. No idea why there was a delay in the first place; users can always use careful annotation management to batch display. http://github.com/appcelerator/titanium_mobile/commit/3c14b2eec6b641ab53cbd43fa0aabab1161955ba"> http://github.com/appcelerator/titanium_mobile/commit/3c14b2eec6b64...