# HG changeset patch # User fknauft # Date 1296654654 -3600 # Node ID 7ed8de30af563cae98204d7d1532a733aa671dce # Parent 89386036e6619a77f53b8b3f8c8d47cfa6b1d9f5 polygon-Layers diff -r 89386036e661 -r 7ed8de30af56 RestDbGisApi.py --- 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'] = ""%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)))