annotate zpt/KML_schema_table.zpt @ 220:733f0561d9f8

implement Google Search
author fknauft
date Fri, 01 Apr 2011 10:52:37 +0200
parents 769866d9d96d
children bdab16f83512
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>
171
b9b0fc8a8c82 smaller point icons
fknauft
parents: 170
diff changeset
12 <size>"10"</size>
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>
171
b9b0fc8a8c82 smaller point icons
fknauft
parents: 170
diff changeset
21 <size>"0.2"</size>
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>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
57 <size>"10"</size>
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>
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
66 <size>"0.2"</size>
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>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
109 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'icon')">
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
110 <description tal:content="place/description" >
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
111 ERD-0815: ERD-0815
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
112 </description>
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
113 <styleUrl tal:content="place/icon" >#marker_icon_red</styleUrl>
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
114 <Point tal:condition="python:place.has_key('icon')">
128
8b7994a50d8e polygon-Layers
fknauft
parents: 126
diff changeset
115 <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
116 </Point>
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
117 </Placemark>
213
769866d9d96d New big Dot-Icons
fknauft
parents: 181
diff changeset
118 <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'LinearRing')">
135
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
119 <description tal:content="place/description" >
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
120 ERD-0815: ERD-0815
ac22bb1e3212 polygon-Layers
fknauft
parents: 130
diff changeset
121 </description>
154
58524989283b polygon-Layers
fknauft
parents: 147
diff changeset
122 <Style> <PolyStyle><color tal:content="place/LineColor">#80800000</color><fill>0.1</fill><outline>1</outline></PolyStyle></Style>
143
6d9ff64bb16b polygon-Layers
fknauft
parents: 138
diff changeset
123 <Polygon><outerBoundaryIs><LinearRing><coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates>
6d9ff64bb16b polygon-Layers
fknauft
parents: 138
diff changeset
124 </LinearRing></outerBoundaryIs></Polygon>
117
3369c21b66e0 polygon-Layers
fknauft
parents: 112
diff changeset
125 </Placemark>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
126 <Placemark tal:condition="withLine">
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
127 <name>Path</name>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
128 <description>Red line visualizes path between locations</description>
56
8eca8a1fbf50 first stab at connecting lines
casties
parents: 55
diff changeset
129 <styleUrl>#red_line</styleUrl>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
130 <LineString>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
131 <extrude>1</extrude>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
132 <tessellate>1</tessellate>
57
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
133 <altitudeMode>clampToGround</altitudeMode>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
134 <coordinates>
b47314bcff37 connect lines works now
casties
parents: 56
diff changeset
135 <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
136 </coordinates>
76
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
137 </LineString>
e0a79d926902 Path for kml included
fknauft
parents: 55
diff changeset
138 </Placemark>
55
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
139 </Document>
2f4c427dec44 wrangled kml construction into template and method
casties
parents:
diff changeset
140 </kml>