annotate zpt/KML_schema_table.zpt @ 59:a5f2550a5b44

more cleanup in kml generation sorting works better more parameters
author casties
date Fri, 22 Oct 2010 19:37:55 +0200
parents b47314bcff37
children 9c66c0ab395c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
1 <?xml version="1.0" encoding="utf-8"?>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
2 <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:tal="http://xml.zope.org/namespaces/tal"
59
a5f2550a5b44 more cleanup in kml generation
casties
parents: 57
diff changeset
3 tal:define="gisIdField python:request.get('gis_id_field',None);
a5f2550a5b44 more cleanup in kml generation
casties
parents: 57
diff changeset
4 latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None);
a5f2550a5b44 more cleanup in kml generation
casties
parents: 57
diff changeset
5 sortBy python:request.get('sort_field',1);
a5f2550a5b44 more cleanup in kml generation
casties
parents: 57
diff changeset
6 schema options/schema; table options/table;
a5f2550a5b44 more cleanup in kml generation
casties
parents: 57
diff changeset
7 data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,gisIdField=gisIdField,latField=latField,lonField=lonField);
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
8 withLine python:request.get('connect_line',None);">
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
9 <Document>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
10 <Style id="marker_icon">
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
11 <IconStyle>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
12 <scale>1.2</scale>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
13 <Icon>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
14 <href>http://chinagis.mpiwg-berlin.mpg.de/chinagis/images/dot_red.png</href>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
15 </Icon>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
16 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
17 </IconStyle>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
18 </Style>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
19 <Style id="red_line">
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
20 <LineStyle>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
21 <color>ff0000ff</color>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
22 <width>4</width>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
23 </LineStyle>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
24 <PolyStyle>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
25 <color>ff0000ff</color>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
26 </PolyStyle>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
27 </Style>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
28 <Placemark tal:repeat="place data">
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
29 <description tal:content="place/description">
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
30 ERD-0815: ERD-0815
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
31 </description>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
32 <styleUrl tal:content="place/icon">#marker_icon</styleUrl>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
33 <Point>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
34 <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
35 </Point>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
36 </Placemark>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
37 <Placemark tal:condition="withLine">
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
38 <name>Path</name>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
39 <description>Red line visualizes path between locations</description>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
40 <styleUrl>#red_line</styleUrl>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
41 <LineString>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
42 <extrude>1</extrude>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
43 <tessellate>1</tessellate>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
44 <altitudeMode>clampToGround</altitudeMode>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
45 <coordinates>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
46 <tal:span tal:repeat="place data" tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</tal:span>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
47 </coordinates>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
48 </LineString>
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
49 </Placemark>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
50 </Document>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
51 </kml>