Skip to content
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

Calling selectAnnotation() from native map view throws "TypeError: nv.selectAnnotation is not a function" #186

Closed
bozhidarc opened this issue Dec 17, 2017 · 2 comments

Comments

@bozhidarc
Copy link

I'm trying to call the MGLMapView.selectAnnotation() from args.map.getNativeMapView(), but the only thing I got is an error.
I need this method so I can show the marker (annotation) title by default.
Am I doing something wrong or maybe the method is missing from the current MapBox version that the plugin wraps?

@EddyVerbruggen
Copy link
Collaborator

EddyVerbruggen commented Jan 13, 2018

Ah, you mean you want to show the callout immediately when you add the marker? Sounds like a good addition to the plugin API (note that Mapbox only allows 1 open callout at any given time).

Looks like that method signature is actually selectAnnotationAnimated(annotation: MGLAnnotation, animated: boolean): void

@EddyVerbruggen EddyVerbruggen self-assigned this Jan 13, 2018
@EddyVerbruggen EddyVerbruggen added this to the 3.2.0 milestone Jan 14, 2018
EddyVerbruggen added a commit that referenced this issue Jan 14, 2018
EddyVerbruggen added a commit that referenced this issue Jan 14, 2018
EddyVerbruggen added a commit that referenced this issue Jan 14, 2018
EddyVerbruggen added a commit that referenced this issue Jan 14, 2018
EddyVerbruggen added a commit that referenced this issue Jan 14, 2018
@EddyVerbruggen
Copy link
Collaborator

With version 3.2.0 you'll be able to add selected: true when adding a marker. See the updated README.

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

No branches or pull requests

2 participants