-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
Tapping an annotation now displays a callout view. Changing the viewport in any way dismisses the callout view. Only one callout view is displayed at a time. Ref #894
We will eventually have callouts on Android and other platforms, perhaps also third-party libraries. We should name here more specifically, as well as pop things into a vendor folder for tidiness.
We will hopefully eventually move to a more MapKit-like model of passing the annotation _view_ here and not the annotation in future.
Backlog right now:
|
On this front, I am going to go the route of our iOS SDK and attach the accessory view properties to the annotation for now. When we get a proper annotation view, we can move it out to there. |
Actually, scratch that, I will put these in temp methods on the map view delegate for now since we'll do some cleanup there around marker symbology, which is a holdover. |
Yeah, this is complex, so gonna punt for now. the problem is if you tap a marker whose presented callout would be partially offscreen. - (NSTimeInterval)calloutView:(SMCalloutView *)calloutView delayForRepositionWithSize:(CGSize)offset
{
(void)calloutView;
NSTimeInterval adjustmentDuration = 0.3;
self.repositioningForCallout = YES;
mbglMap->moveBy(offset.width, offset.height, secondsAsDuration(adjustmentDuration));
return adjustmentDuration;
} Here we use The problem here though is that One way to solve this would be to hack up Again, not a huge deal right now, as we also likely have issues with navigation and/or toolbars and need to work with 👞 🏈 |
Repositioning noodling looking this for when we hit this: |
BTW one clear way to do this would be to create a |
This feels much better with 0dbed13. |
Giving this some more tire-kicking, then rolling a squash PR. |
Let me know before you squash, so I can update 756-user-dot first. |
I was also planning on running with #1082 next anyway. |
Changes Unknown when pulling 7efb15e on 894-callout into * on master*. |
Yet another branch related to annotations. This PR adds very basic callout views. Tapping an annotation now displays a callout view. Changing the viewport in any way dismisses the callout view. Only one callout view is displayed at a time.
Remaining work:
Fixes #894.