view zpt/KML_schema_table.zpt @ 55:2f4c427dec44

wrangled kml construction into template and method kml currently constructed live
author casties
date Wed, 29 Sep 2010 21:09:44 +0200
parents
children 8eca8a1fbf50 e0a79d926902
line wrap: on
line source

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:tal="http://xml.zope.org/namespaces/tal" 
  tal:define="schema options/schema; table options/table; data python:here.getKmlData(schema=schema,table=table);">
  <Document>
    <Style id="marker_icon">
      <IconStyle>
        <scale>15</scale>
        <Icon>
          <href>http://chinagis.mpiwg-berlin.mpg.de/chinagis/images/dot_red.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <Placemark tal:repeat="place data">
      <description tal:content="place/description"><![CDATA[<b>ERD-0815: ERD-0815</a><br>
Jingshi: Jingshi</a><br>
nma_1898541: nma_1898541</a><br>
Forbidden City: Forbidden City</a><br>
1406: 1406</a><br>
720000: 720000</a><br>
]]></description>
      <styleURL tal:content="place/icon">#marker_icon</styleURL>
      <Point>
        <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>