Mercurial > hg > ChinaGisRestApi
changeset 127:7ed8de30af56
polygon-Layers
author | fknauft |
---|---|
date | Wed, 02 Feb 2011 14:50:54 +0100 |
parents | 89386036e661 |
children | 8b7994a50d8e |
files | RestDbGisApi.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/RestDbGisApi.py Wed Feb 02 14:41:24 2011 +0100 +++ b/RestDbGisApi.py Wed Feb 02 14:50:54 2011 +0100 @@ -161,7 +161,7 @@ paramstr = urllib.urlencode(params) return "%s/db/%s/%s?%s"%(baseUrl,schema,table,paramstr) - def getKmlData(self, schema, table, ids=None, sortBy=1, gisIdField=None, latField=None, lonField=None, geometry="point", color_field="red"): + def getKmlData(self, schema, table, ids=None, sortBy=1, gisIdField=None, latField=None, lonField=None, geomField="point", colorField="red"): """returns data structure for KML template""" logging.debug("getKMLdata gid=%s lat=%s lon=%s"%(gisIdField,latField,lonField)) # Mapping a set of points from table-based SQL-query: @@ -287,14 +287,14 @@ #kmlPlace['description'] = "<![CDATA[%s]]>"%desc kmlPlace['description'] = desc - if geometry=='point': - kmlPlace['icon'] = '#marker_icon_'+color_field + if geomField=='point': + kmlPlace['icon'] = '#marker_icon_'+colorField kmlPlace['coord_x'] = str(xCoord) kmlPlace['coord_y'] = str(yCoord) kmlPlace['coord_z'] = '0' - if geometry=='poly': + if geomField=='poly': kmlPlace['LinearRing']=geomdata.split('(')[4] - kmlPlace['LineColor']=color_field + kmlPlace['LineColor']=colorField kmlData.append(kmlPlace) #logging.debug("kmlData=%s"%(repr(kmlData)))