comparison zpt/KML_schema_table.zpt @ 278:4ade9b80b563 default tip

more cleanup. descriptions work better now.
author casties
date Fri, 24 Feb 2012 16:41:30 +0100
parents d1b43624cc63
children
comparison
equal deleted inserted replaced
277:9bfa7a6858f1 278:4ade9b80b563
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:tal="http://xml.zope.org/namespaces/tal" 2 <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:tal="http://xml.zope.org/namespaces/tal"
3 tal:define="gisIdField python:request.get('gis_id_field',None); colorField python:request.get('color_field','red'); 3 tal:define="gisIdField python:request.get('gis_id_field',None);
4 latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None); geomField python:request.get('geometry_field','point'); 4 colorField python:request.get('color_field','red');
5 sortBy python:request.get('sort_field',1); ids python:request.get('id'); 5 latField python:request.get('lat_field',None);
6 lonField python:request.get('lon_field',None);
7 geomField python:request.get('geometry_field','point');
8 sortBy python:request.get('sort_field',1);
9 ids python:request.get('id');
6 from_year_name python:request.get('from_year_name','from_year'); 10 from_year_name python:request.get('from_year_name','from_year');
7 until_year_name python:request.get('until_year_name','until_year'); 11 until_year_name python:request.get('until_year_name','until_year');
8 schema options/schema; table options/table; 12 schema options/schema; table options/table;
9 data python:here.getKmlData(schema=schema,table=table, 13 data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,ids=ids,gisIdField=gisIdField,
10 sortBy=sortBy,ids=ids,gisIdField=gisIdField, 14 latField=latField,lonField=lonField,geomField=geomField,colorField=colorField,
11 latField=latField,lonField=lonField, 15 from_year_name=from_year_name,until_year_name=until_year_name);
12 geomField=geomField,colorField=colorField,
13 from_year_name=from_year_name,until_year_name=until_year_name );
14 withLine python:request.get('connect_line',None);"> 16 withLine python:request.get('connect_line',None);">
15 <Document> 17 <Document>
16 <Style id="marker_icon_red"> 18 <Style id="marker_icon_red">
17 <IconStyle> 19 <IconStyle>
18 <scale>"10"</scale> 20 <scale>"10"</scale>
183 </Style> 185 </Style>
184 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'icon')"> 186 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'icon')">
185 <description tal:content="place/description"> 187 <description tal:content="place/description">
186 ERD-0815: ERD-0815 188 ERD-0815: ERD-0815
187 </description> 189 </description>
188 <TimeStamp tal:condition="python:here.trydatahas_key(data,0,'TimeStamp')"><when tal:content="place/TimeStamp"></when> 190 <TimeStamp tal:condition="python:here.trydatahas_key(data,0,'TimeStamp')">
191 <when tal:content="place/TimeStamp"></when>
189 </TimeStamp> 192 </TimeStamp>
190 <TimeSpan tal:condition="python:here.trydatahas_key(data,0,'TimeSpan0')"><begin tal:content="place/TimeSpan0" ></begin><end tal:content="place/TimeSpan1"></end> 193 <TimeSpan tal:condition="python:here.trydatahas_key(data,0,'TimeSpan0')">
194 <begin tal:content="place/TimeSpan0" ></begin>
195 <end tal:content="place/TimeSpan1"></end>
191 </TimeSpan> 196 </TimeSpan>
192
193 <styleUrl tal:content="place/icon" >#marker_icon_red</styleUrl> 197 <styleUrl tal:content="place/icon" >#marker_icon_red</styleUrl>
194 <Point tal:condition="python:place.has_key('icon')"> 198 <Point tal:condition="python:place.has_key('icon')">
195 <extrude>1</extrude> 199 <extrude>1</extrude>
196 <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates> 200 <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates>
197 </Point> 201 </Point>
199 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'LinearRing')"> 203 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'LinearRing')">
200 <name>Border-Line</name> 204 <name>Border-Line</name>
201 <description tal:content="place/description" > 205 <description tal:content="place/description" >
202 ERD-0815: ERD-0815 206 ERD-0815: ERD-0815
203 </description> 207 </description>
204 <TimeStamp tal:condition="python:here.trydatahas_key(data,0,'TimeStamp')"><when tal:content="place/TimeStamp"></when> 208 <TimeStamp tal:condition="python:here.trydatahas_key(data,0,'TimeStamp')">
209 <when tal:content="place/TimeStamp"></when>
205 </TimeStamp> 210 </TimeStamp>
206 <TimeSpan tal:condition="python:here.trydatahas_key(data,0,'TimeSpan0')"><begin tal:content="place/TimeSpan0" ></begin><end tal:content="place/TimeSpan1"></end> 211 <TimeSpan tal:condition="python:here.trydatahas_key(data,0,'TimeSpan0')">
212 <begin tal:content="place/TimeSpan0" ></begin>
213 <end tal:content="place/TimeSpan1"></end>
207 </TimeSpan> 214 </TimeSpan>
208
209 <styleUrl tal:content="place/lineColor" >#red_line</styleUrl> 215 <styleUrl tal:content="place/lineColor" >#red_line</styleUrl>
210 <LineString> 216 <LineString>
211 <extrude>1</extrude> 217 <extrude>1</extrude>
212 <tessellate>1</tessellate> 218 <tessellate>1</tessellate>
213 <coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates> 219 <coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates>