简体   繁体   English

如何在 Jupyter Python Notebook 中的 gmap 上显示文本?

[英]How to display text on gmaps in Jupyter Python Notebook?

Background: I'm using the gmaps package in Jupyter Python notebook.背景:我在 Jupyter Python 笔记本中使用 gmaps package。 I have 2 points A (which is a marker) and B (which is a symbol) which is connected by a line.我有 2 个点 A(这是一个标记)和 B(这是一个符号),它们由一条线连接。

Question: I want to somehow display text on this line that represents the distance between A and B. I have already calculated the distance between A and B but cannot display the text on the map.问:我想以某种方式在这条线上显示代表 A 和 B 之间距离的文本。我已经计算了 A 和 B 之间的距离,但无法在 map 上显示文本。 Is there any way to display text on the line?有什么办法可以在线显示文字吗?

I found that gmaps doesn't have this feature so I switched to folium package which has labels and popups to display text on hover and clicking the line.我发现 gmaps 没有这个功能,所以我切换到 folium package,它有标签和弹出窗口,可以在 hover 上显示文本并单击该行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM