[mapguide-users] active selection on the dwf viewer MG 2010

Neele Berit.Schaefer at gmx.de
Thu Jun 18 09:08:05 EDT 2009


Hi guys,

I’ve the following problem with the selection on the DWF Viewer.

I’am trying to set a active selection on the map using the web API (asp.net
VB). My code seems to run just finde with the AJAX Viewer but when I try to
select a Feature on the dwf viewer it doesn’t work.The Status-bar doesn’t
show an selected object as well. There is no error on the whole page.
Furthermore the XmlString is fine as well. I’ve tried nearly everything I
could found……
Seem like the selection command isn’t working right on the DWF Viewer. 

Does anyone have experience with the issue? 


Code:
***************************************************************************___________________________________________________________________________
        Dim FeatureResID As New
MgResourceIdentifier("Library://Ordner/Daten/BP.FeatureSource")
        Dim selection As New MgSelection(map)
        Dim featureReader As MgFeatureReader
        Dim queryoption As New MgFeatureQueryOptions

        Dim layer As MgLayer
        layer = map.GetLayers.GetItem("BAUPLATZ")

        For i As Integer = 0 To o
         
            Dim ID_string As String = "NUMMER= '" + r(i) + "' "
            queryoption.SetFilter(ID_string)


          
            featureReader = featureService.SelectFeatures(FeatureResID, "
BP:BAUPLATZ", queryoption)           
   '_________________________________________________________________
            featureReader = layer.SelectFeatures(queryoption)
            selection.AddFeatures(layer, featureReader, anzahl)
          
            Dim pp As Integer = 1

            anzahl += 1
            If i = o Then selection.Save(resourceService, mapname) :
featureReader.Close()
           
          
        Next

    Dim FeatureResID As New
MgResourceIdentifier("Library://Ordner/Daten/BP.FeatureSource")
        Dim selection As New MgSelection(map)
        Dim featureReader As MgFeatureReader
  str = selection.ToXml
______________________________________

	javascript:

var selXML='<%=str %>';
	parent.kartenFrame.viewerFrame.mapFrame.SetSelectionXML(selXML);
______________________________________
	

_________________________________________________________________________
***************************************************************************

-- 
View this message in context: http://n2.nabble.com/active-selection-on-the-dwf-viewer-MG-2010-tp3113153p3113153.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list