Mercurial > hg > ChinaGisRestApi
changeset 56:8eca8a1fbf50
first stab at connecting lines
author | casties |
---|---|
date | Tue, 19 Oct 2010 18:08:49 +0200 |
parents | 2f4c427dec44 |
children | b47314bcff37 |
files | zpt/KML_schema_table.zpt |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/zpt/KML_schema_table.zpt Wed Sep 29 21:09:44 2010 +0200 +++ b/zpt/KML_schema_table.zpt Tue Oct 19 18:08:49 2010 +0200 @@ -1,6 +1,7 @@ <?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);"> + tal:define="schema options/schema; table options/table; data python:here.getKmlData(schema=schema,table=table); + withLine python:request.get('connect_line',None);"> <Document> <Style id="marker_icon"> <IconStyle> @@ -10,6 +11,12 @@ </Icon> </IconStyle> </Style> + <Style id="red_line"> + <LineStyle> + <color>red</color> + <width>4</width> + </LineStyle> + </Style> <Placemark tal:repeat="place data"> <description tal:content="place/description"><![CDATA[<b>ERD-0815: ERD-0815</a><br> Jingshi: Jingshi</a><br> @@ -23,5 +30,16 @@ <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates> </Point> </Placemark> + <Placemark tal:condition="withLine"> + <name>Path</name> + <description>Red line visualizes path between locations</description> + <styleUrl>#red_line</styleUrl> + <LineString> + <extrude>1</extrude> + <tessellate>1</tessellate> + <altitudeMode>absolute</altitudeMode> + <coordinates tal:repeat="place data" tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates> + </LineString> + </Placemark> </Document> </kml>