欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

gmap 支持python吗_在gmap中使用bokeh的python为for circle添加工具提示

发布时间:2023/12/20 47 豆豆
生活随笔 收集整理的这篇文章主要介绍了 gmap 支持python吗_在gmap中使用bokeh的python为for circle添加工具提示 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

我的密码from bokeh.io import output_file, show

from bokeh.models import ColumnDataSource, GMapOptions

import bokeh.plotting as plotting

from bokeh.plotting import gmap

import tkinter as tk

screenInfo=tk.Tk()

map_options = GMapOptions(lat=26.366314, lng= 77.016513, map_type="roadmap", zoom=5)

# For GMaps to function, Google requires you obtain and enable an API key:

#

# https://developers.google.com/maps/documentation/javascript/get-api-key

#

# Replace the value below with your personal API key:

p = gmap(API_KEY, map_options, title="Austin",plot_width=screenInfo.winfo_screenwidth()-100, plot_height=screenInfo.winfo_screenheight()-100)

source = ColumnDataSource(

df

)

p.circle(x="lat", y="lon", size=15,name="Place", fill_color="blue", fill_alpha=0.8, source=source)

plotting.output_file('gmap.html')

show(p)

这里我需要添加一个圆的工具提示

我试着用

^{pr2}$

但工具提示只适用于图形,而不适用于gmap。

那么,有没有其他方法来获取工具提示呢。在

总结

以上是生活随笔为你收集整理的gmap 支持python吗_在gmap中使用bokeh的python为for circle添加工具提示的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。