-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASMapNode] Toggling liveMap on does not enable touches #1753
Comments
@george-gw: Great question - thanks for watching out for the consistency of ASDK's API! @aaronschubert0: It looks like you were the original author of this feature. Could you weigh in on this? Was this the intended behavior? |
@george-gw: I just checked out the code and this does seem to be an oversight rather than a feature. Do you feel confident putting up a pull request for this? |
@george-gw: I tested this and userInteraction is enabled after setting liveMap=YES (sometime after creating the map node). However, it seems that the mapNode is capturing the touch events. |
@hannahmbanana @george-gw Yeah seems to be an oversight, strange it wasn't flagged earlier. @george-gw happy for you to submit a PR for this if you wish (so you can test on your specific scenario), otherwise I can fix it. |
…ive#1753) ASMapNode: Change map snapshot when updating it with a new region (facebookarchive#1754) ASMapNode: Commented out code that is causing inaccurate behavior
…ive#1753) ASMapNode: Change map snapshot when updating it with a new region (facebookarchive#1754) ASMapNode: Commented out code that is causing inaccurate behavior Added a basic example for ASMapNode to try out the different changes
@hannahmbanana I have added an Example in the pull request, I don't know if this should be there, but it's a way for you to test out the different solutions, you can actually take that code and run it on the old version (without my changes) to see the differences. |
…hive#1753) [ASMapNode] Change map snapshot when updating it with a new region (facebookarchive#1754) [ASMapNode] Commented out code that is causing inaccurate behavior [ASMapNode] Added the ability to zoom in and show annotations, similar to showAnnotations:animated: of MKMapView. Added a basic example for ASMapNode to try out the different changes
Scenario:
1- Create
ASMapNode
2- At some point during the app, toggle
liveMap = true
3- Map does not receive touches
Solution:
when you set
liveMap = true
, setmapNode.userInteractionEnabled = true
Looking at the code, I saw that
self.userInteractionEnabled = YES
is only enabled indidLoad
ofASMapNode
when the node is created withliveMap = true
, was there a reason for it to be that way rather than enabling and disabling it inaddLiveMap
andremoveLiveMap
respectively?The text was updated successfully, but these errors were encountered: