You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works well except the results count is one step backwards. Like the count of visible annotations before I have swiped or zoomed the map. (Probably because before is this method called on delegate, it is called internally and it calls refreshMapView which is probably async - otherwise I don't know why the count should be back one step)
This seemed to return correct number of annotations. But I have noticed this is also not solution, because if there is for example on the map 10 annotations, 2 on the right side, and I drag the map to the left side (8 annotations will become hidden, 2 will remain, nothing will be added) then the method above will not be called, because 10 annotations has been already added before the drag.
So the only solution at moment I have is async delayed call like this: (which returns correct number of results)
Or do you have any other solution how to get the list of visible items on the map after user drags/zooms the map?
Drawback of my solution is, that 1 second is quite long for update, but if I use shorter delay and there is lot of data, it can be too soon.
Thx
Otherwise your code is great and I am happy that it is so easy to withdraw even the Realm data when user drags/zooms the map. (Because the data source for my table displayed below the map also uses Realm objects, so the table can easily cooperate with the map)
The text was updated successfully, but these errors were encountered:
Hi, I want to get the currently visible data (annotations) on the map always when users drags/zooms the map using the delegate method:
It works well except the results count is one step backwards. Like the count of visible annotations before I have swiped or zoomed the map. (Probably because before is this method called on delegate, it is called internally and it calls refreshMapView which is probably async - otherwise I don't know why the count should be back one step)
I noticed there is also this delegate method:
This seemed to return correct number of annotations. But I have noticed this is also not solution, because if there is for example on the map 10 annotations, 2 on the right side, and I drag the map to the left side (8 annotations will become hidden, 2 will remain, nothing will be added) then the method above will not be called, because 10 annotations has been already added before the drag.
So the only solution at moment I have is async delayed call like this: (which returns correct number of results)
Or do you have any other solution how to get the list of visible items on the map after user drags/zooms the map?
Drawback of my solution is, that 1 second is quite long for update, but if I use shorter delay and there is lot of data, it can be too soon.
Thx
Otherwise your code is great and I am happy that it is so easy to withdraw even the Realm data when user drags/zooms the map. (Because the data source for my table displayed below the map also uses Realm objects, so the table can easily cooperate with the map)
The text was updated successfully, but these errors were encountered: