Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Leaflet Control [draft]#1662

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Conengmo wants to merge2 commits intopython-visualization:main
base:main
Choose a base branch
Loading
fromConengmo:leaflet-control

Conversation

Conengmo
Copy link
Member

@ConengmoConengmo commentedNov 23, 2022
edited
Loading

Trying out an idea I had based on a number of issues I've encountered. Use the Leaflet Control class to put legends, images or other custom stuff on the map. That way they integrate better with other Leaflet features, such as full screen and potentially layer control.

Before this is ready I'll look at how this combines with layer control. And what the potential benefits are for other folium classes that are currently outside of Leaflet control.

Possibly related issues:
#450
#1344
#1079
#1167

Some lessons:

  • Nearly everything in Leaflet is meant to move with the map. So inheriting from anything related toL.Layer is not the way to go.
  • L.Controlis static, but can't be switched in LayerControl.
  • Adding arbitrary content as a control is one use case, making arbitrary content switchable with layer control is a separate use case.

@ConengmoConengmo changed the titleLeaflet ControlLeaflet Control [draft]Jan 4, 2023
@hansthen
Copy link
Collaborator

@Conengmo Would you mind if I continue this branch?

The feature in itself would be really useful. Also, from an architectural perspective, adding aControl base class would also be beneficial, especially for plugins with items that subclassL.Control. These now subclass directly frombranca.MacroElement which is not the cleanest solution.

@hansthenhansthen mentioned this pull requestJun 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Conengmo@hansthen

[8]ページ先頭

©2009-2025 Movatter.jp