【问题标题】:html popup window in simplekmlsimplekml中的html弹出窗口
【发布时间】:2017-07-19 10:09:06
【问题描述】:

假设我有一个 html 表:

<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 弹出窗口的最简单/最佳方法是什么?

【问题讨论】:

    标签: python html google-earth simplekml


    【解决方案1】:

    刚刚找到。描述和balloonstyle接受Html标签。

    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'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-10
      相关资源
      最近更新 更多