[mapguide-users] Not Implemented for MgSelection.GenerateFilter
Darrin Maidlow
dmaidlow at landorgis.com
Mon Apr 14 15:27:52 EDT 2008
Skipped content of type multipart/alternative-------------- next part --------------
Dim szSelXML As String
'to avoid asp.net from finding 'dangerous' strings in the querystring, we need to double escape the XML in the client
'so here we need to urldecode it
szSelXML = server.urldecode(Request.QueryString("A"))
Dim szOutScript As String = ""
If szSelXML <> "" Then
Dim szSessionID As String = WebRADE.WRAPI.WRBase.fnGetSession("MGESession", Session)
Dim siteConnection As MgSiteConnection
siteConnection = WebRADE.MGE.Session.GetExistingMGConnection(szSessionID)
Dim resSvc As MgResourceService
resSvc = siteConnection.CreateService(MgServiceType.ResourceService)
Dim featSvc As MgFeatureService = siteConnection.CreateService(MgServiceType.FeatureService)
Dim szMapName As String = Request.QueryString("B")
Dim oMap As New MgMap
oMap.Open(resSvc, szMapName)
Dim currentSel As New MgSelectionBase(oMap)
'currentSel.Open(resSvc, szMapName)
currentSel.FromXml(szSelXML)
Dim selLays As MgReadOnlyLayerCollection
Dim selLay As MgLayer
selLays = currentSel.GetLayers()
Dim szSelection As String = ""
Dim queryOptions As New MgFeatureQueryOptions
For Each selLay In selLays
If selLay.GetName() = "FloorView Documents" Then
Dim szLayerClassName As String = selLay.GetFeatureClassName()
If szSelection = "" Then
szSelection = currentSel.GenerateFilter(selLay, szLayerClassName)
Else
szSelection &= currentSel.GenerateFilter(selLay, szLayerClassName)
End If
Dim szLayerFeatureSrcID As String
szLayerFeatureSrcID = selLay.GetFeatureClassName
Dim layerResID As New MgResourceIdentifier(szLayerClassName)
queryOptions.SetFilter(szSelection)
Dim featureReader As MgFeatureReader
End If
Next
End If
More information about the mapguide-users
mailing list