python-visualization / python-visualization/folium

Make it possible for a marker to link to another marker

Open
#1,563 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
7.4k
Forks
2.3k
Avg merge
17h 22m
Merged PRs (30d)
11

Description

Is your feature request related to a problem? Please describe.
It may be a common use case that a marker might relate to other relevant makers. It would be great if a marker's popup could contain links to other markers.

Describe the solution you'd like
Have a standard way to include in a popup links to other markers. The link, once activated, would:

  • deactivate its own marker's popup,
  • center the map view on the target marker,
  • and activate the target marker's popup.

Describe alternatives you've considered
Just referencing the other marker by an id, with no link, but that is confusing, awkward, unwieldy, and impractical for the end user, which not only would have to keep in mind an id but also have to search for it around the map.

Additional context
That would make it possible for users to easily navigate between relevant markers.

However, activating markers by links might not be a feature that leaflet.js itself supports, I haven't checked yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; start by examining Folium's marker popup handling and the Leaflet.js marker APIs. Done means a popup link deactivates its current marker, centers the map on the target marker, and opens the target popup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.