When developing with the high-D map SDK, you need to customize the bubble blow out box and find that the click event added by the bubble or the button is not responding.
Cause: The custom bubbles are added to the pin, and the size of the pin is only a small part below, so the Calloutview is outside the pin.
An IOS button that exceeds the parent view range is a handling method that cannot respond to events.
Workaround:
To override the HitTest method in CUSTOMANNOTATIONVIEW.M:
-(UIView *) HitTest: (cgpoint) point withevent: (Uievent *) Event {
UIView *view = [Super Hittest:point withevent:event];
if (view = = nil) {
Cgpoint tempoint = [Self.calloutView.navBtn convertpoint:point fromview:self];
if (Cgrectcontainspoint (Self.calloutView.navBtn.bounds, Tempoint))
{
view = Self.calloutView.navBtn;
}
}
return view;
}
The self.calloutView.navBtn here is the button you need to click
The pro-test is available.
German iOS custom Bubble add Click event Invalid issue