55
|
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"
|
110
|
3 tal:define="gisIdField python:request.get('gis_id_field',None); colorField python:request.get('color_field',None);
|
126
|
4 latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None); geomField python:request.get('geometry_field',None);
|
59
|
5 sortBy python:request.get('sort_field',1);
|
|
6 schema options/schema; table options/table;
|
126
|
7 data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,gisIdField=gisIdField,latField=latField,lonField=lonField,geomField=geomField,colorField=colorField );
|
56
|
8 withLine python:request.get('connect_line',None);">
|
55
|
9 <Document>
|
110
|
10 <Style id="marker_icon_red">
|
|
11 <IconStyle>
|
|
12 <scale>1.2</scale>
|
|
13 <Icon>
|
|
14 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_red.png</href>
|
|
15 </Icon>
|
|
16 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
|
|
17 </IconStyle>
|
|
18 </Style>
|
|
19 <Style id="marker_icon_black">
|
55
|
20 <IconStyle>
|
57
|
21 <scale>1.2</scale>
|
55
|
22 <Icon>
|
110
|
23 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_black.png</href>
|
|
24 </Icon>
|
|
25 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
|
|
26 </IconStyle>
|
|
27 </Style>
|
|
28 <Style id="marker_icon_blue">
|
|
29 <IconStyle>
|
|
30 <scale>1.2</scale>
|
|
31 <Icon>
|
|
32 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_blue.png</href>
|
|
33 </Icon>
|
|
34 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
|
|
35 </IconStyle>
|
|
36 </Style>
|
|
37 <Style id="marker_icon_green">
|
|
38 <IconStyle>
|
|
39 <scale>1.2</scale>
|
|
40 <Icon>
|
|
41 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_green.png</href>
|
|
42 </Icon>
|
|
43 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
|
|
44 </IconStyle>
|
|
45 </Style>
|
|
46 <Style id="marker_icon_violett">
|
|
47 <IconStyle>
|
|
48 <scale>1.2</scale>
|
|
49 <Icon>
|
|
50 <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_violett.png</href>
|
55
|
51 </Icon>
|
57
|
52 <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
|
55
|
53 </IconStyle>
|
|
54 </Style>
|
56
|
55 <Style id="red_line">
|
76
|
56 <LineStyle>
|
57
|
57 <color>ff0000ff</color>
|
76
|
58 <width>4</width>
|
|
59 </LineStyle>
|
57
|
60 <PolyStyle>
|
|
61 <color>ff0000ff</color>
|
|
62 </PolyStyle>
|
76
|
63 </Style>
|
122
|
64 <Placemark tal:repeat="place data" >
|
|
65 <description tal:content="place/description" tal:condition="place/icon">
|
57
|
66 ERD-0815: ERD-0815
|
|
67 </description>
|
122
|
68 # <styleUrl tal:content="place/icon" >#marker_icon</styleUrl>
|
|
69 <styleUrl tal:content="place/icon" tal:condition="place/icon">#marker_icon_red</styleUrl>
|
|
70 <Point tal:condition="place/icon">
|
|
71 <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}" tal:condition="place/icon">116.38,39.92,0</coordinates>
|
55
|
72 </Point>
|
122
|
73 <Style tal:condition="place/LinearRing">
|
|
74 <PolyStyle><color tal:content="place/LineColor">#80800000</color><fill>1</fill><outline>1</outline></PolyStyle></Style>
|
126
|
75 <MultiGeometry tal:condition="place/LinearRing"><Polygon><outerBoundaryIs><LinearRing><coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates>
|
122
|
76 </LinearRing></outerBoundaryIs></Polygon></MultiGeometry>
|
117
|
77 </Placemark>
|
56
|
78 <Placemark tal:condition="withLine">
|
76
|
79 <name>Path</name>
|
|
80 <description>Red line visualizes path between locations</description>
|
56
|
81 <styleUrl>#red_line</styleUrl>
|
76
|
82 <LineString>
|
|
83 <extrude>1</extrude>
|
|
84 <tessellate>1</tessellate>
|
57
|
85 <altitudeMode>clampToGround</altitudeMode>
|
|
86 <coordinates>
|
|
87 <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>
|
|
88 </coordinates>
|
76
|
89 </LineString>
|
|
90 </Placemark>
|
55
|
91 </Document>
|
|
92 </kml>
|