[mapguide-users] how to highlight the zoomed parcel with background color?

anand anand.speck at gmail.com
Mon Jul 25 01:46:04 EDT 2011


hi all,
I'm using Mapguide 2.1. I've written code to zoom a parcel but, when it
zooms it doesn't highlight with any background color. The following is the
code i'm using, and is there any mistake i'm doing?

 Dim requestParams As NameValueCollection = IIf(Request.HttpMethod = "POST",
Request.Form, Request.QueryString)
                Dim sessionId As String = Request.QueryString("SESSION")
                Dim realPath As String =
Request.ServerVariables("APPL_PHYSICAL_PATH")
                Dim configPath As String = realPath + "webconfig.ini"
                MapGuideApi.MgInitializeWebTier(configPath)
                Dim userInfo As MgUserInformation = New
MgUserInformation(sessionId)
                Dim siteConnection As MgSiteConnection = New
MgSiteConnection
                siteConnection.Open(userInfo)
                Dim resService As MgResourceService =
siteConnection.CreateService(MgServiceType.ResourceService)
                Dim featureService As MgFeatureService =
siteConnection.CreateService(MgServiceType.FeatureService)
                ' Dim fetresource As MgResourceIdentifier = New
MgResourceIdentifier(resourcepath)
                Dim nameQuery As MgFeatureQueryOptions = New
MgFeatureQueryOptions()
                Dim val As String = giscolumn
                Dim queryval As String = Session("parcelid")
                Dim totquery As String = val & "LIKE" & "'" & queryval & "'"
                nameQuery.SetFilter(totquery)
                Dim tabname As String = propertylayer
                Dim map As MgMap = New MgMap(siteConnection)
                map.Open(oramap)
                Dim layer As MgLayer =
map.GetLayers().GetItem(propertylayer)
                Dim layerfeatures As MgFeatureReader =
layer.SelectFeatures(nameQuery)
                Dim layer1 As MgLayer =
map.GetLayers().GetItem(propertylayer)
                Dim selection As MgSelection = New MgSelection(map)
                selection.AddFeatures(layer1, layerfeatures, 0)
                Dim selectXML As String = selection.ToXml()
                ScriptManager.RegisterStartupScript(Page, Page.GetType(),
"parcelview", "select('" & selectXML & "');", True)


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-highlight-the-zoomed-parcel-with-background-color-tp6617229p6617229.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list