Conversation
|
🚀 Deployed on https://690ec9592ec57229c958e40b--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes two methods (get_style() and get_style_layers()) from the MapLibreMap class and refactors the add_tile_layer() method to improve code organization and parameter handling.
- Removes
get_style()andget_style_layers()methods (lines 1083-1126 in the original file) - Refactors
add_tile_layer()to explicitly handle attribution, minzoom/maxzoom, and pass opacity/visible parameters toadd_layer() - Improves code clarity in
add_tile_layer()with better separation of source and layer configuration
Comments suppressed due to low confidence (1)
anymap/maplibre.py:1
- Removing these methods will break the code as they are actively used in multiple locations. In maplibre.py,
get_style_layers()is called on line 199 (in__init__), line 298 (infind_style_layer), line 311 (infind_first_symbol_layer), line 977 (inset_visibility), and line 995 (inset_opacity). Additionally, it's used in maplibre_widgets.py on line 864. These methods must be retained or all call sites must be updated with alternative implementations.
"""MapLibre GL JS implementation of the map widget.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.