【发布时间】:2021-07-23 17:35:32
【问题描述】:
有没有办法让 KML 文件中的弹出气泡变大?目前我已经显示了信息。但它并不干净。如果所有粗体项目都在左侧,它会看起来更干净。有点困惑,因为如果我玩弄宽度,这是有道理的,什么都没有改变。想法?建议添加?
#Define the Objects within the Plot Line Chart
def PlotLineChart(myKml, latList, lonList, heightList=[], name="", descriptionList="", color="", width=5):
"""
Plot Line Chart
"""
descriptionString = ''
for desc in descriptionList:
descriptionString += (desc + '\n')
print(descriptionString)
ls = myKml.newlinestring(
name=name,
description=descriptionString
)
coords = []
if len(heightList) == 0:
for (lat, lon) in zip(latList, lonList):
coords.append((lon, lat))
else:
for (lat, lon, height) in zip(latList, lonList, heightList):
coords.append((lon, lat, height))
ls.coords = coords
ls.extrude = 1
ls.altitudemode = simplekml.AltitudeMode.relativetoground
ls.style.linestyle.width = width
ls.style.linestyle.color = GetColorObject(color)
【问题讨论】:
-
您在哪个平台上查看 KML?谷歌地球专业版?地球网络/移动?谷歌地图?其他 KML 查看器?他们中的大多数会尊重 HTML 内容的基本大小,并展开气球以适应。如果您可以提供您的 KML 样本,我们或许能够更有效地建议技术和细节。
-
@ChristiaanAdams 使用 Google 地球专业版。 'PC' 上面是项目的图像 - 在代码下