Hi,

 

I'm stuck trying to work with a selection generated from the dwf viewer.
I've been working with the sample in the developers guide but ported over to
vb.net.  I'm running MGE 2008.

 

Basically I go through the motions, create new selection based on the passed
selectionXML and everything is cool until I get to the
MgSelection.GenerateFilter call.  When I pass the layer object, and the
session ID I get an MgNotImplemented error.

 

I've attached a text file with a bit o' code.  Any suggestions would be
greatly appreciated.  I'm sure I've missed something little or done
something silly.

 

Thanks

darrin

 

 

                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
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to