我有一个作业,需要在纬度和经度周围绘制10公里的地理围栏。我正在使用Plotly来创建该区域中设备的散点图,但是我不知道如何绘制地理围栏。
data = [
go.Scattermapbox(
lat=['28.09029007'],
lon=['77.33970642'],
mode='markers',
marker=dict(
size=9,
color='red'
),
text=["Main Equipment"],
)
,
go.Scattermapbox(
lat=lat,
lon=long,
mode='markers',
marker=dict(
size=9,
color='blue'
),
text=label,
)
]
layout = go.Layout(
autosize=True,
hovermode='closest',
mapbox=dict(
accesstoken=mapbox_access_token,
bearing=0,
center=dict(
lat=28.09,
lon=77.33
),
pitch=0,
zoom=10
),
)
fig = dict(data=data, layout=layout)