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

Flutter support #182

Open
maxammann opened this issue Oct 9, 2022 · 4 comments
Open

Flutter support #182

maxammann opened this issue Oct 9, 2022 · 4 comments
Labels
feature-request Request for a new feature WIP-ISSUE Do not yet work on this issue!

Comments

@maxammann
Copy link
Collaborator

maxammann commented Oct 9, 2022

🤔 Expected Behavior

😯 Current Behavior

💁 Possible Solution

🔦 Context

💻 Examples

@maxammann maxammann added feature-request Request for a new feature WIP-ISSUE Do not yet work on this issue! labels Oct 9, 2022
@JulianBissekkou
Copy link

One of the many downsides of 3rd party map rendering frameworks is the ability to include platform views into the map.
Let's say we are running on iOS then it would be nice to have a custom marker that is backed by a UIView.
Same goes for Flutter. Something that was frequently requested in the google maps flutter sdk was the ability to create flutter widgets as markers.

If we add support for adding native views as map elements, then we might be able to support flutter widgets as well because we should be able to render specific widgets into an android surface or texture view.

I would love to get your feedback and thoughts on this @maxammann

@maxammann
Copy link
Collaborator Author

yes, absolutely. The differenciation between, SDK views (UIView, DOM element) is a tough topic.

You definitely want to use SDK views where ever possible actually. But that comes with a high development cost, because you then need to develop the feature X times (web, android, iOS, desktop).

But like you said: If we support flutter, then we might be able to render close-to-native views on top of the map easily.
That being said, a downside is that flutter might become a dependency. If that is the case, then large corporations like Meta might have issues integrating maplibre-rs due to a large (in size and count) dependency tree.

@JulianBissekkou
Copy link

Shouldn't it be "easy" to avoid the dependency to flutter (or any other framework) in maplibre-rs?
Let's say someone wants to use maplibre-rs for flutter, then we would provide a dart package that has (ffi?) bindings for maplibre-rs and it also takes care of giving us a simple widget that we can use.
Same goes for an android lib that provides a kotlin interface and a android.View.

Afaik maplibre-rs needs a surface to paint to and this will be provided by the platform view in all cases, right? For a marker we can do the same thing. Give maplibre-rs a surface for a marker and additionally render the platform view in the marker surface as well?
Correct me if I am wrong, I am pretty new to this topic but I would love to learn more about it and contribute to the maplibre-rs flutter sdk once its possible.

@maxammann
Copy link
Collaborator Author

I think we need to concertize what we want to achieve. I'm a little bit lost on what we want to achieve.

The maplibre could already provide callbacks which then trigger e.g. the movement of a native android.Button.

@maxammann maxammann added this to the Far far future milestone Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature WIP-ISSUE Do not yet work on this issue!
Projects
None yet
Development

No branches or pull requests

2 participants