annotate zpt/KML_schema_table.zpt @ 233:bdab16f83512

show line and polygon-layer
author fknauft
date Mon, 01 Aug 2011 21:35:27 +0200
parents 769866d9d96d
children 7c5d825a0083
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"
147
628f0f42a390 polygon-Layers
fknauft
parents: 146
diff changeset
3 tal:define="gisIdField python:request.get('gis_id_field',None); colorField python:request.get('color_field','red');
628f0f42a390 polygon-Layers
fknauft
parents: 146
diff changeset
4 latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None); geomField python:request.get('geometry_field','poly');
59
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;
147
628f0f42a390 polygon-Layers
fknauft
parents: 146
diff changeset
7 data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,gisIdField=gisIdField,latField=latField,lonField=lonField,geomField=geomField,colorField=colorField );
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>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
10 <Style id="marker_icon_red">
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
11 <IconStyle>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
12 <scale>"10"</scale>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
13 <Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
14 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_red.png</href>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
15 </Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
16 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
17 </IconStyle>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
18 </Style>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
19 <Style id="marker_icon_black">
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
20 <IconStyle>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
21 <scale>"0.2"</scale>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
22 <Icon>
181
b51bef861494 smaller point icons
fknauft
parents: 180
diff changeset
23 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_black.png</href>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
24 </Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
25 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
26 </IconStyle>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
27 </Style>
168
b89af1cc01c9 smaller point icons
fknauft
parents: 167
diff changeset
28 <Style id="marker_icon_blue">
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
29 <IconStyle>
169
607cc141fd88 smaller point icons
fknauft
parents: 168
diff changeset
30 <scale>"0.2"</scale>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
31 <Icon>
170
4bc4ce85348f smaller point icons
fknauft
parents: 169
diff changeset
32 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_blue.png</href>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
33 </Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
34 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
35 </IconStyle>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
36 </Style>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
37 <Style id="marker_icon_green">
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
38 <IconStyle>
169
607cc141fd88 smaller point icons
fknauft
parents: 168
diff changeset
39 <scale>"0.2"</scale>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
40 <Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
41 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_green.png</href>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
42 </Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
43 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
44 </IconStyle>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
45 </Style>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
46 <Style id="marker_icon_violett">
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
47 <IconStyle>
169
607cc141fd88 smaller point icons
fknauft
parents: 168
diff changeset
48 <scale>"0.2"</scale>
110
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
49 <Icon>
346cbc290aff changable color for dots in map
fknauft
parents: 77
diff changeset
50 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_violett.png</href>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
51 </Icon>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
52 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
53 </IconStyle>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
54 </Style>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
55 <Style id="marker_icon_red_big">
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
56 <IconStyle>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
57 <scale>"10"</scale>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
58 <Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
59 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_red_big.png</href>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
60 </Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
61 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
62 </IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
63 </Style>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
64 <Style id="marker_icon_black_big">
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
65 <IconStyle>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
66 <scale>"0.2"</scale>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
67 <Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
68 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_black_big.png</href>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
69 </Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
70 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
71 </IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
72 </Style>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
73 <Style id="marker_icon_blue_big">
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
74 <IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
75 <scale>"0.2"</scale>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
76 <Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
77 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_blue_big.png</href>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
78 </Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
79 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
80 </IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
81 </Style>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
82 <Style id="marker_icon_green_big">
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
83 <IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
84 <scale>"0.2"</scale>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
85 <Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
86 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_green_big.png</href>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
87 </Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
88 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
89 </IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
90 </Style>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
91 <Style id="marker_icon_violett_big">
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
92 <IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
93 <scale>"0.2"</scale>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
94 <Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
95 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_violett_big.png</href>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
96 </Icon>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
97 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
98 </IconStyle>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
99 </Style>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
100 <Style id="red_line">
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
101 <LineStyle>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
102 <color>ff0000ff</color>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
103 <width>4</width>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
104 </LineStyle>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
105 <PolyStyle>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
106 <color>ff0000ff</color>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
107 </PolyStyle>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
108 </Style>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
109 <Style id="blue_poly">
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
110 <LineStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
111 <color>0000ffff</color>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
112 <width>2</width>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
113 </LineStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
114 <PolyStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
115 <color>0000ffff</color>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
116 </PolyStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
117 </Style>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
118 <Style id="black_poly">
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
119 <LineStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
120 <color>000000ff</color>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
121 <width>2</width>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
122 </LineStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
123 <PolyStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
124 <color>000000ff</color>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
125 </PolyStyle>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
126 </Style>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
127 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'icon')">
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
128 <description tal:content="place/description" >
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
129 ERD-0815: ERD-0815
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
130 </description>
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
131 <styleUrl tal:content="place/icon" >#marker_icon_red</styleUrl>
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
132 <Point tal:condition="python:place.has_key('icon')">
128
8b7994a50d8e polygon-Layers
fknauft
parents: 126
diff changeset
133 <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
134 </Point>
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
135 </Placemark>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
136 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'LinearRing')">
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
137 <description tal:content="place/description" >
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
138 ERD-0815: ERD-0815
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
139 </description>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
140 <!-- <styleUrl tal:content="place/icon" >#red_line</styleUrl> -->
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
141 <styleUrl >#red_line</styleUrl>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
142 <LineString>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
143 <extrude>1</extrude>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
144 <tessellate>1</tessellate>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
145 <coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates>
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
146 </LineString>
117
3369c21b66e0 polygon-Layers
fknauft
parents: 112
diff changeset
147 </Placemark>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
148 <Placemark tal:condition="withLine">
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
149 <name>Path</name>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
150 <description>Red line visualizes path between locations</description>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
151 <styleUrl>#red_line</styleUrl>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
152 <LineString>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
153 <extrude>1</extrude>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
154 <tessellate>1</tessellate>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
155 <altitudeMode>clampToGround</altitudeMode>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
156 <coordinates>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
157 <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
158 </coordinates>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
159 </LineString>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
160 </Placemark>
233
bdab16f83512 show line and polygon-layer
fknauft
parents: 213
diff changeset
161 </Document>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
162 </kml>