Mercurial > hg > ChinaGisRestApi
view zpt/KML_schema_table.zpt @ 253:d6c7bedf4370
New reload button active in upper right corner of block
author | fknauft |
---|---|
date | Fri, 23 Sep 2011 13:11:46 +0200 |
parents | 7c5d825a0083 |
children | 901c1f745d13 |
line wrap: on
line source
<?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:tal="http://xml.zope.org/namespaces/tal" tal:define="gisIdField python:request.get('gis_id_field',None); colorField python:request.get('color_field','red'); latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None); geomField python:request.get('geometry_field','poly'); sortBy python:request.get('sort_field',1); schema options/schema; table options/table; data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,gisIdField=gisIdField,latField=latField,lonField=lonField,geomField=geomField,colorField=colorField ); withLine python:request.get('connect_line',None);"> <Document> <Style id="marker_icon_red"> <IconStyle> <scale>"10"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_red.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_black"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_black.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_blue"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_blue.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_green"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_green.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_violett"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_violett.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_red_big"> <IconStyle> <scale>"10"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_red_big.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_black_big"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_black_big.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_blue_big"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_blue_big.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_green_big"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_green_big.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="marker_icon_violett_big"> <IconStyle> <scale>"0.2"</scale> <Icon> <href>http://mappit.mpiwg-berlin.mpg.de/mappit/icons/dot_violett_big.png</href> </Icon> <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </IconStyle> </Style> <Style id="red_line"> <LineStyle> <color>ff0000ff</color> <width>2</width> </LineStyle> </Style> <Style id="green_line"> <LineStyle> <color>ff00ff00</color> <width>2</width> </LineStyle> </Style> <Style id="black_line"> <LineStyle> <color>ff000000</color> <width>2</width> </LineStyle> </Style> <Style id="violett_line"> <LineStyle> <color>ffff00ff</color> <width>2</width> </LineStyle> </Style> <Style id="blue_line"> <LineStyle> <color>ffff0000</color> <width>2</width> </LineStyle> </Style> <Style id="red_big_line"> <LineStyle> <color>ff0000ff</color> <width>4</width> </LineStyle> </Style> <Style id="green_big_line"> <LineStyle> <color>ff00ff00</color> <width>4</width> </LineStyle> </Style> <Style id="black_big_line"> <LineStyle> <color>ff000000</color> <width>4</width> </LineStyle> </Style> <Style id="violett_big_line"> <LineStyle> <color>ffff00ff</color> <width>4</width> </LineStyle> </Style> <Style id="blue_big_line"> <LineStyle> <color>ffff0000</color> <width>4</width> </LineStyle> </Style> <Style id="blue_poly"> <LineStyle> <color>ffff0000</color> <width>2</width> </LineStyle> <PolyStyle> <color>ffff0000</color> </PolyStyle> </Style> <Style id="black_poly"> <LineStyle> <color>ff000000</color> <width>2</width> </LineStyle> <PolyStyle> <color>ff000000</color> </PolyStyle> </Style> <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'icon')"> <description tal:content="place/description" > ERD-0815: ERD-0815 </description> <styleUrl tal:content="place/icon" >#marker_icon_red</styleUrl> <Point tal:condition="python:place.has_key('icon')"> <coordinates tal:content="string:${place/coord_x},${place/coord_y},${place/coord_z}">116.38,39.92,0</coordinates> </Point> </Placemark> <Placemark tal:repeat="place data" tal:condition="python:here.trydatahas_key(data,0,'LinearRing')"> <name>Border-Line</name> <description tal:content="place/description" > ERD-0815: ERD-0815 </description> <styleUrl tal:content="place/lineColor" >#red_line</styleUrl> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <coordinates tal:content="string:${place/LinearRing}">116.38,39.92,0</coordinates> </LineString> </Placemark> <Placemark tal:condition="withLine"> <name>Path</name> <description>Red line visualizes path between locations</description> <styleUrl>#red_line</styleUrl> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <altitudeMode>clampToGround</altitudeMode> <coordinates> <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> </coordinates> </LineString> </Placemark> </Document> </kml>