-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: leftButton not always responding to click #577
Comments
@hansemannn did you have time to look at this issue? |
I oversaw it, sorry! Will schedule to complete this month |
To understand this correctly: The accessories leftView/rightView & leftButton/rightButton were also in the "click" event of the map view? How were they distinguished from the normal click events? |
I think they'll returned e.g. I've only created the ticket for a Slack user (can't find it because it's too old) but we have another thread about it too |
That slack user is me! @m1ga |
Okay, so I've spent some time on this, but couldn't find any issue with the code, yet. Though I am sure to know what could cause it: The click listener is currently handled via the "global" map click event of the map, which may not always respond to child views of the annotations. When looking into other native implementations, they use a tap gesture recognizer for the button / view itself, which is much more flexible, also in terms of advanced tap gestures like "longpress" and "singletap". I will try to refactor the code to use these gesture recognizers instead and start clean. The ti.map module has a LOT of legacy code that should be cleaned up. |
I'm having this issue also, on iOS 16.3.1 and Ti.Map v7.0.0 click source never returns 'leftButton' or 'rightButton' but is working for 'infoWindow' Is this likely to be fixed? Many thanks Lyn |
I am seriously considering to rewrite ti.map completely in Swift to start fresh for things like this. Any thoughts if it's worth it? |
Hi Hans, We use the map module in two apps both iOS and Droid and apart from this issue it seems to work to an acceptable level. I would assume that its a popular module but guess you would need to ask the community. |
Same problem - but solved it by sliding in options into the view I usually would attach to left/right button. (Like - calculate route, more info and stuff. But yeah - would be great with an update to the module :) |
fwiw...I see the title says the left/right button is "not always" responding.....however for me it fails 100% of the time. on 12.1.2.GA - for |
Hey Hey. I will help sponsor a portion the Ti.Map rewrite and contribute what I can . Mapping should be considered first-class as it’s such an important part of our day-to-day lives. I’d love to see this module get updated and even some modern MapKit features added 🙂 |
So I finally was able to build ti.map on iOS and added some logs. build the moduleI had to remove the last else Click eventAt first I added a log in: Then I tried this:
plus
will show the log everytime and trigger the click event when you click on the leftButton. I'm not sure if that is the correct way (or a good way) to do it but it works and maybe something to fix the issue. @hansemannn would this be a way to fix it? |
In general, yes. The possible problem is that it could cause lags in the map view when having many annotations (maybe 500+), because every instance will have an own native click listener. If this does not cause issues, it's a good solution. |
test PR #655 for people to test. There is a ZIP and demo code. 500 annotations is ok too 😄 sometime it takes a bit to run the "open annotation" animation (same as in the current live module) but the click event is instant. edit: |
The leftButton is not always responding to a click. It sometimes stays in the "clicked" position too.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: