changeset 146:24828625c0ce

polygon-Layers
author fknauft
date Thu, 03 Feb 2011 13:42:05 +0100
parents 303a6de26031
children 628f0f42a390
files RestDbGisApi.py zpt/KML_schema_table.zpt
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/RestDbGisApi.py	Thu Feb 03 13:26:15 2011 +0100
+++ b/RestDbGisApi.py	Thu Feb 03 13:42:05 2011 +0100
@@ -300,18 +300,18 @@
                 for poly in polys:
                     coords=poly.replace(')','').split(',')
                     if len(coords)>1:
-                       coord_string=''
-                       for coord in coords:
-                           coord=coord.split(' ')
-                           try:
-                               x_coord=coord[0]
-                               y_coord=coord[1]
-                           except:
-                               break
-                           coord_string+=x_coord+','+y_coord+','+'0 \n'
-                    kmlPlace['LinearRing']=coord_string              
-                    kmlPlace['LineColor']=colorField
-                    kmlData.append(kmlPlace)
+                        coord_string=''
+                        for coord in coords:
+                            coord=coord.split(' ')
+                            try:
+                                x_coord=coord[0]
+                                y_coord=coord[1]
+                            except:
+                                break
+                            coord_string+=x_coord+','+y_coord+','+'0 \n'
+                        kmlPlace['LinearRing']=coord_string              
+                        kmlPlace['LineColor']=colorField
+                        kmlData.append(kmlPlace)
         #logging.debug("kmlData=%s"%(repr(kmlData)))
         return kmlData
 
--- a/zpt/KML_schema_table.zpt	Thu Feb 03 13:26:15 2011 +0100
+++ b/zpt/KML_schema_table.zpt	Thu Feb 03 13:42:05 2011 +0100
@@ -4,7 +4,7 @@
   latField python:request.get('lat_field',None); lonField python:request.get('lon_field',None); geomField python:request.get('geometry_field',None);
   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 ); 
+  data python:here.getKmlData(schema=schema,table=table,sortBy=sortBy,gisIdField=gisIdField,latField=latField,lonField=lonField); 
   withLine python:request.get('connect_line',None);">
   <Document>
     <Style id="marker_icon_red">