maplibre / maplibre-rs

Experimental Maps for Web, Mobile and Desktop
Apache License 2.0
1.35k stars 79 forks source link

Render to views on Android/iOS #28

Open maxammann opened 2 years ago

maxammann commented 2 years ago

At some point we want to render to specific android and ios views and not to the whole screen. This is currently unsupported by winit.

Sadly it is not enough to render to a surface provided by the NDK/UIKit/AppKit. We also need to hook into the input handlers of iOS and Android. Maybe we should think about removing the complete winit dependency and handle all gestures in the corresponding SDKs and control the maplibre view from there. This means that the input handlers would be written in Swift/Kotlin/JavaScript instead of Rust.

iOS:

Difficult because winit is bound to the main UIApplicationView

Android:

Difficult because winit is bound to the main NativeActivity

Gestures

maxammann commented 2 years ago

Take a look at #91 when thinking about adding gesture/input handling.

maxammann commented 3 months ago

This is a relevant update I believe: https://github.com/rust-windowing/winit/pull/3758