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

View-backed annotations #404

Closed
santong opened this issue Aug 18, 2016 · 11 comments · Fixed by #509
Closed

View-backed annotations #404

santong opened this issue Aug 18, 2016 · 11 comments · Fixed by #509

Comments

@santong
Copy link

santong commented Aug 18, 2016

Hi, thanks for the repo.
But I found it's really inconvenient that we can't customize annotations.

So hope to add this feature. Thank you!

@xvalentino
Copy link

Anyone have an idea to where we can start to implement this? I'm transitioning from react-native-maps which had this feature.

@santong
Copy link
Author

santong commented Aug 20, 2016

@xvalentino
I have read the../react-native-mapbox-gl/index.js. It seems that the map logic are implemented by native methods.

So the only way that I can see is use remote images if we want to customize annotations. Maybe we could add some interfaces to transfer some data to display.

BUT the url image still not work on Android #391.

@digitaldavenyc
Copy link

+1 for this feature

@nunull
Copy link

nunull commented Aug 28, 2016

+1

@aksonov
Copy link
Contributor

aksonov commented Sep 16, 2016

Looks like iOS SDK master already has this feature. When we could expect usage of React Native Views for annotations?

mapbox/mapbox-gl-native#5882

@1ec5
Copy link
Contributor

1ec5 commented Sep 18, 2016

If I understand correctly, the RNMBGL component isn’t currently designed to function as a container for other views rendered by React Native. This will prevent RNMBGL from being able to take direct advantage of the view-backed annotation support added in mapbox/mapbox-gl-native#4801 for mapbox/mapbox-gl-native#1784. I don’t know if this is a fundamental limitation of React Native or just an enhancement that will need to be made to RNMBGL, but there definitely isn’t a timetable for bringing this feature over to React Native yet.

If you need view-backed annotations in the meantime and don’t mind writing your application in (truly) native iOS technologies, I’d recommend using the Mapbox iOS SDK directly in Objective-C or Swift.

@1ec5 1ec5 changed the title Feature want: custom annotation View-backed annotations Sep 18, 2016
@1ec5
Copy link
Contributor

1ec5 commented Sep 18, 2016

It’s the same story on Android, where the Mapbox Android SDK also supports view-backed markers, but RNMBGL would have to work like a container somehow.

@aksonov
Copy link
Contributor

aksonov commented Sep 20, 2016

@1ec5 I don't see any fundamental problem to support custom views, like react-native-maps package does with native MapView. I would like to try, will you accept PR when it will be finished?

@1ec5
Copy link
Contributor

1ec5 commented Sep 20, 2016

@aksonov, if that’s possible, by all means, please open a PR for it. @bsudekum would be more qualified to review it, though. 😄

@aksonov
Copy link
Contributor

aksonov commented Sep 22, 2016

@1ec5 please check #421

@1ec5
Copy link
Contributor

1ec5 commented Sep 27, 2016

As of #421, arbitrary React Native views can be used as view-backed annotations on iOS.

#423 takes a markedly different approach for Android. Instead of arbitrary React Native views, the developer specifies the usual annotation options (plus a few more) and those options are implemented using MarkerViews.

irvingchenn pushed a commit to studyroz/react-native-mapbox-gl that referenced this issue Jun 9, 2020
…escript

Typescript definitions for updated VectorSource / RasterSource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants