Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

didSelectAnnotation:(id<MGLAnnotation>)annotation issue #2315

Closed
DKalachniuk opened this issue Sep 13, 2015 · 3 comments
Closed

didSelectAnnotation:(id<MGLAnnotation>)annotation issue #2315

DKalachniuk opened this issue Sep 13, 2015 · 3 comments

Comments

@DKalachniuk
Copy link

I have custom image for annotation.
when I press on bottom part of image I receive callback in
-(void)mapView:(MGLMapView *)mapView didSelectAnnotation:(id)annotation{

if I press at the top - NO callback. Any suggestions?

@friedbunny
Copy link
Contributor

How large is your custom image? The hitbox for annotations is currently hard-coded to 40x60, which is a known limitation that we're working to fix in #1504.

@DKalachniuk
Copy link
Author

it is 100x120
so currently I need to resize it to 40x60 max. Am I right?

@friedbunny
Copy link
Contributor

so currently I need to resize it to 40x60 max. Am I right?

Yes, if you need the entire annotation to be tappable the @1x image should be 40x60.

If you wanted to compile your own MBGL and only needed a single, larger-sized annotation image, here is where you would edit the hitbox size.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants