-
Notifications
You must be signed in to change notification settings - Fork 125
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
Open
itheamc
wants to merge
16
commits into
maplibre:main
Choose a base branch
from
itheamc:feat-added-set-style-method-on-controller
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f2a2c61
Added setStyle method on MaplibreMapController for updating style wit…
itheamc b6d0b42
Merge branch 'main' into main
josxha 525d121
Merge branch 'maplibre:main' into main
itheamc 0bafec2
Merge branch 'maplibre:main' into main
itheamc 74d00af
Merge branch 'maplibre:main' into main
itheamc 9e3a0cd
Merge remote-tracking branch 'origin/main'
itheamc ad0ae91
replaced _maplibreGlPlatform to _maplibrePlatform on controller setSt…
itheamc c46c61e
Merge remote-tracking branch 'origin/main' into feat-added-set-style-…
itheamc 2bc6df6
added information regarding the style string format
itheamc 788a8a1
auto applied style on map created
itheamc 67f257f
synced with main branch
itheamc 925ba67
returning error if style is missing or invalid args
itheamc 5b5e639
synced with main branch
itheamc 64e11c6
minor changes
itheamc 106fb36
Synced with main branch
itheamc 9635a95
Merge branch 'main' into feat-added-set-style-method-on-controller
josxha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1156,4 +1156,16 @@ class MapLibreMapController extends MapLibrePlatform | |
Future<List> getSourceIds() async { | ||
throw UnimplementedError(); | ||
} | ||
|
||
/// Method to set style string | ||
/// [styleString] -> It will take json, url, absolute path or asset path | ||
/// | ||
@override | ||
Future<void> setStyle(String styleString) async { | ||
try { | ||
_map.setStyle(styleString); | ||
} on PlatformException catch (e) { | ||
return Future.error(e); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When does _map.setStyle throw a PlatformException? (It's not used in the other methods.) |
||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Adding the option to change the map to this example could be confusing because this example showcases that the map style can in general be loaded from an local source. Could you create a new page that showcases this functionality please?