首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用simplekml表示的html弹出窗口

用simplekml表示的html弹出窗口
EN

Stack Overflow用户
提问于 2017-02-28 20:25:53
回答 1查看 517关注 0票数 2

假设我有一个html表:

代码语言:javascript
复制
<table border="1">
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
</table>

使用python包simplekml将html位插入到kml弹出窗口中最简单/最好的方法是什么?

EN

回答 1

Stack Overflow用户

发布于 2017-02-28 23:17:01

就是找到了。Description和balloonstyle接受超文本标记语言。

代码语言:javascript
复制
kml = simplekml.Kml(open=0) # open a file
pfol = kml.newfolder(name='foo',open=0) # start a folder
pol = pfol.newpoint(name= 'bar') # define a point
pol.balloonstyle.text = '<HTMLTABLE>' # insert html
pol.description = 'my point'
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42508733

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档