# HG changeset patch
# User casties
# Date 1287592044 -7200
# Node ID b47314bcff375c615b95f79a48291766c6d7f9c7
# Parent 8eca8a1fbf507feef6fd26f3faf0b44a47304275
connect lines works now
diff -r 8eca8a1fbf50 -r b47314bcff37 RestDbGisApi.py
--- a/RestDbGisApi.py Tue Oct 19 18:08:49 2010 +0200
+++ b/RestDbGisApi.py Wed Oct 20 18:27:24 2010 +0200
@@ -11,6 +11,7 @@
import re
import json
import time
+import urllib
from RestDbInterface import *
@@ -52,7 +53,7 @@
self.REQUEST.RESPONSE.setHeader("Content-Type", "text/plain")
id = self.REQUEST.get('id',[])
doc = self.REQUEST.get('doc',None)
- return self.getLiveKmlUrl(schema=schema,table=table,id=id,doc=doc)
+ return self.getLiveKmlUrl(schema=schema,table=table)
def checkTableMetaPermission(self,action,schema,table,user=None):
@@ -154,10 +155,17 @@
baseUrl = self.absolute_url()
return "%s/daten/%s"%(baseUrl,kml)
- def getLiveKmlUrl(self,schema='chgis',table='mpdl',id=None,doc=None):
+ def getLiveKmlUrl(self,schema,table,REQUEST=None):
+ if REQUEST is None:
+ REQUEST = self.REQUEST
logging.debug("getLiveKmlUrl")
baseUrl = self.absolute_url()
- return "%s/db/%s/%s?format=KML"%(baseUrl,schema,table)
+ timestamp = time.time()
+ params = [p for p in REQUEST.form.items() if p[0] not in ('format','timestamp')]
+ params.append(('format','KML'))
+ params.append(('timestamp',timestamp))
+ paramstr = urllib.urlencode(params)
+ return "%s/db/%s/%s?%s"%(baseUrl,schema,table,paramstr)
def getDataForGoogleMap(self,schema='chgis',table='mpdl',id=None,doc=None):
logging.debug("getDataForGoogleMap")
@@ -257,21 +265,23 @@
name = data['fields'][i][0]
logging.debug("value=%s"%value)
if value != None:
- if name.find('name')>-1:
- desc += "
\n'
- kmlPlace['description'] = ""%desc
+ #kmlPlace['description'] = ""%desc
+ kmlPlace['description'] = desc
kmlPlace['icon'] = '#marker_icon'
kmlPlace['coord_x'] = str(xCoord)
kmlPlace['coord_y'] = str(yCoord)
diff -r 8eca8a1fbf50 -r b47314bcff37 zpt/GIS_schema_table.zpt
--- a/zpt/GIS_schema_table.zpt Tue Oct 19 18:08:49 2010 +0200
+++ b/zpt/GIS_schema_table.zpt Wed Oct 20 18:27:24 2010 +0200
@@ -1,7 +1,7 @@
-