-
Notifications
You must be signed in to change notification settings - Fork 171
Additional functionality exposed #616
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
Conversation
|
Implements #596 |
|
do you have time to review @gabbopalma ? |
|
@srmncnk can you take a look at the pipeline errors? |
sure, i will check tomorrow/next days |
|
Hello @srmncnk, I have added some comments for improvements to be made. The PR looks good, and thank you for your contribution! |
maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java
Outdated
Show resolved
Hide resolved
maplibre_gl_platform_interface/lib/src/maplibre_gl_platform_interface.dart
Outdated
Show resolved
Hide resolved
maplibre_gl_platform_interface/lib/src/method_channel_maplibre_gl.dart
Outdated
Show resolved
Hide resolved
|
@gabbopalma Thanks for the quick review! Agreed and implemented, please have a look. |
the pipeline is still failing, could you check the errors? |
|
@gabbopalma @AlexanderThiele Looks good to me now. Will add examples to sample app in the evening. |
|
perfect, thanks for the improvements. I will review again when examples are added. Thank you! |
maplibre_gl/ios/maplibre_gl/Sources/maplibre_gl/MapLibreMapController.swift
Outdated
Show resolved
Hide resolved
maplibre_gl_platform_interface/lib/src/method_channel_maplibre_gl.dart
Outdated
Show resolved
Hide resolved
maplibre_gl_platform_interface/lib/src/maplibre_gl_platform_interface.dart
Outdated
Show resolved
Hide resolved
|
I added easeCamera, queryCameraPosition and setMaximumFps to AnimateCameraPage example. I didn't bother with offline mode since it's hard to make an example of it with offline data. Same for authentication, it's a very specific usecase. |
gabbopalma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hii, we have these minor issues to resolve. Could you also check why the pipelines are failing? Thank you
maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: Gabriel <[email protected]>
Co-authored-by: Gabriel <[email protected]>
|
@gabbopalma @AlexanderThiele Took me a bit, busy days. Did run the tests locally with melos, LGTM. |
|
Hi @srmncnk, the PR seems LGTM and is ready to being merged. We have one last reviewed change to apply (I can't do it), lost among the old applied suggestions. This will be merged into |
Co-authored-by: Gabriel <[email protected]>
|
@gabbopalma Sounds great, thank you very much! I applied your change, we're good to go. |
Overview
This PR introduces additional functionality to the flutter wrapper from the native library.
1. Performance Controls
setMaximumFps(int fps)- Controls rendering performance by limiting frame rateforceOnlineMode()- Forces the map to use online mode in some cases on older Android devices where device is offline but you're serving offline data via local serverWhy this matters: Essential for battery optimization on mobile devices and ensuring custom implemented offline data.
2. Enhanced Camera Control
animateCameraWithDuration(CameraUpdate cameraUpdate, int duration)- Smooth camera animations with precise timing controlqueryCameraPosition()- Retrieves current camera state for programmatic map controlWhy this matters: Enables smooth user experiences and allows developers to build sophisticated map interactions with predictable timing.
3. Advanced Style and Layer Control
editGeoJsonSource(String id, String data)- Updates GeoJSON data in real-timeeditGeoJsonUrl(String id, String url)- Changes GeoJSON source URLs dynamicallysetLayerFilter(String layerId, String filter)- Applies complex filters to map layersgetStyle()- Exports current map style as JSONWhy this matters: Very useful when you want to manipulate style and layers quickly and dynamically.
5. Custom Authentication
setCustomHeaders(Map<String, String> headers, List<String> filter)- Adds custom headers to map requestsgetCustomHeaders()- Retrieves current custom headersWhy this matters: Essential for authenticating map tiles.
Impact
This is production ready and well tested, we ported our exposed functionality from previous repository from tobrun. As we're switching to maplibre, this is what we need.