Browse Source

removed namespace from layer name

Jachym Cepicky 14 years ago
parent
commit
705a8091c8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      wfs/__init__.py

+ 3 - 2
wfs/__init__.py

@@ -10,12 +10,14 @@ import urlparse
 import logging
 from osgeo import ogr
 import os
+import re
 
 class WFS(OWS):
 
     service = "WFS"
     wfsns = "http://www.opengis.net/wfs"
     layerDefFile = None
+    lyrobj = None
 
     def __init__(self,url=None,qstring=None,configFiles=None):
         OWS.__init__(self,url,qstring)
@@ -53,7 +55,7 @@ class WFS(OWS):
             lyrobj.setMetaData("wfs_request_method","GET")
             lyrobj.setConnectionType(mapscript.MS_WFS,'')
             lyrobj.connection = self.getLayerUrl()
-            lyrobj.data = name
+            lyrobj.data = re.sub(r".*:","",name)
             if ds:
                 ogrLayer = ds.GetLayerByName(name)
                 extent = self.getLayerExtent(layer,layer.crsOptions[0])
@@ -132,4 +134,3 @@ class WFS(OWS):
                return mapscript.MS_LAYER_LINE
         else:
                return mapscript.MS_LAYER_POINT
-