-
Notifications
You must be signed in to change notification settings - Fork 171
feat: added set style method on controller #444
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
feat: added set style method on controller #444
Conversation
…hout rebuilding map
# Conflicts: # example/lib/local_style.dart
josxha
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.
Hi @itheamc, thank you for keeping your pull request updated with the main branch.
The user has the option to add annotations like circles, symbols and so on. After the user changes the style of the map the annotations added by the user should be still on the map to avoid an inconcistent state between flutter and the maplibre SDKs.
|
Hi @itheamc, I've seen that you clicked on "Resolve conversations" for my comments but 4 haven't been implemented. Could you give some quick details what's the reason please? |
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.
Pull Request Overview
This PR adds a setStyle method to the MapLibre GL controller that allows dynamically changing the map's style at runtime. The implementation spans across all platform layers (interface, web, iOS, Android) and provides support for various style formats including URLs, local assets, file paths, and raw JSON.
- Adds
setStylemethod to the platform interface with comprehensive documentation - Implements the method across all platform-specific controllers (web, iOS, Android)
- Updates the example app to demonstrate programmatic style setting with a delay
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| maplibre_gl_platform_interface/lib/src/maplibre_gl_platform_interface.dart | Defines the abstract setStyle method with detailed documentation |
| maplibre_gl/lib/src/controller.dart | Implements the main controller's setStyle method |
| maplibre_gl_platform_interface/lib/src/method_channel_maplibre_gl.dart | Implements method channel communication for setStyle |
| maplibre_gl_web/lib/src/maplibre_web_gl_platform.dart | Implements web platform-specific setStyle method |
| maplibre_gl/ios/maplibre_gl/Sources/maplibre_gl/MapLibreMapController.swift | Adds iOS native implementation with error handling |
| maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java | Adds Android native implementation with null checking |
| maplibre_gl_example/lib/local_style.dart | Updates example to use programmatic style setting instead of constructor parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
maplibre_gl_platform_interface/lib/src/maplibre_gl_platform_interface.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
…terface.dart Co-authored-by: Copilot <[email protected]>
…onditions and handling stale style references. Minor fixes on local style web example.
…te asset path documentation for setStyle method.
…kInfo.plist for compatibility
|
Hello @itheamc, and thank you for your contribution. I apologize for the delay in reviewing it. I took the liberty of applying some changes to your PR, but the basis was really good! |
No description provided.