Any help would be much appreciated? Code below:
Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Load Dim featureReader As MgFeatureReader ' Initialize MapGuide InitMapGuide() Dim map As New MgMap(_SiteConnection) map.Open(_ResourceService, _MapName) Dim selection As New MgSelection(map, _SelectionXml) Dim subFilterSize As Int16 = 20 Dim SelectionString As String Dim layer As MgLayer = map.GetLayers().GetItem("Hydrants") Dim QueryOptions As MgFeatureQueryOptions = _ New MgFeatureQueryOptions() SelectionString = selection.GenerateFilter _ (layer, layer.FeatureClassName) QueryOptions.SetFilter(SelectionString) featureReader = selection.GetSelectedFeatures _ (layer, layer.FeatureClassName, False) selection = New MgSelection(map) selection.AddFeatures(layer, featureReader, 0) _SelectionXml = selection.ToXml 'This is the JavaScrip for which I cannot find ' a VB equivalent: 'Parent.Parent.mapFrame.SetSelectionXML(_Selection
Xml) End Sub
Solved! Go to Solution.
Your VB.net code executes on the (web) server-side.
Thanks for your suggestion Jackie,
But being that I am rather new at this and since I did spent the better part of today trying to figure out how to implement your suggestion (without much success) would it be possible for you to include a bit of code to show how this is done, preferably some code that relates to the "mapguide" problem at hand? Thanks,