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

Can not create a custom annotation view #868

Open
AlaeddineOuerteni opened this issue Nov 28, 2021 · 5 comments
Open

Can not create a custom annotation view #868

AlaeddineOuerteni opened this issue Nov 28, 2021 · 5 comments
Assignees
Labels
feature 🍏 When working on a new feature or feature enhancement

Comments

@AlaeddineOuerteni
Copy link

AlaeddineOuerteni commented Nov 28, 2021

With the new MapBox version we can not create custom annotation view as before.

@ZiZasaurus ZiZasaurus self-assigned this Nov 29, 2021
@ZiZasaurus
Copy link
Contributor

@AlaeddineOuerteni can you provide some additional information regarding what you're trying to create? Are you trying to implement a callout with your annotation view or something different?

@qizh
Copy link

qizh commented Dec 2, 2021

@ZiZasaurus, I'm not an issue author but I'm trying to migrate from v6 SDK to v10 SDK and I can't find a way to create a default callout for a point annotation. Looks like there's no such thing in the new SDK 🤔. Or am I missing something?

If there's no default callout, what is the way to create a custom one? Is there an example for it?
Any help would be appreciated.

@ZiZasaurus
Copy link
Contributor

ViewAnnotations were made available in v10.2.0-beta.1. Please take a look at our viewAnnotations examples [1, 2].

@qizh
Copy link

qizh commented Dec 3, 2021

@ZiZasaurus, thank you. I've seen this functionality and it's great for making custom callouts. Though I was looking for something that is similar to your default callouts from v6.

Default callout usage example for SDK v6

So I don't need to manage all those things on my own:

  • Move the camera so the callout fits the screen when appeared on marker tap.
  • Create a callout view that is aware of map edges and will look well despite of annotation marker's screen location.
  • Manage annotation marker taps to make sure just one callout is visible at a time.

Are you going to introduce such a default callout as a part of SDK anytime soon?

@tyofemi tyofemi added the feature 🍏 When working on a new feature or feature enhancement label Dec 8, 2021
@ionutivan
Copy link

The examples mentioned by @ZiZasaurus moved here [1, 2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🍏 When working on a new feature or feature enhancement
Projects
None yet
Development

No branches or pull requests

6 participants