python-visualization / python-visualization/folium

Make it possible for a marker to link to another marker

未关闭
#1,563 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement
主要语言
Python
星标
7.4k
派生
2.3k
平均合并
17 小时 22 分钟
30 天内合并 PR
11

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

该 issue 没有指定文件或测试;请先检查 Folium 对标记弹出窗口的处理方式以及 Leaflet.js 的标记 API。完成的标准是:弹出窗口链接停用当前标记,将地图居中到目标标记,并打开目标弹出窗口。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, python
领域
data-visualization, frontend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。