hlite query
lakku
veeraswamyd at YAHOO.CO.IN
Wed May 30 23:31:36 PDT 2007
iam working with mapserver using C# mapscript
iam displaying a map in imagebutton control
now i want to zoom the features on the map related to query
ie when user selects the layer and sub layer from dropdownlists and enters
the value in the textbox then related features must be hilited and zoomed on
the map
i have wriiten a code for only hiliting the features but it is not working
my code is :
ddlLayersQuery is the dropdownlist (layers)
ddlFieldsQuery is the dropdownlist (sublayers)
txtValue is the textbox
Dim image As imageObj
Dim img As Byte()
Dim ms As MemoryStream
Dim bitmap, mapimage As Bitmap
Dim str, st, st1 As String
str = ddlLayersQuery.SelectedItem.ToString
layer = map.getLayerByName(str)
st = ddlFieldsQuery.SelectedItem.ToString
Try
layer.queryByAttributes(map, st, txtValue.Text, 1)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Try
image = map.drawQuery()
'image.save("mapimg.png", map)
img = image.getBytes()
Finally
ms = New MemoryStream(img)
mapimage = System.Drawing.Image.FromStream(ms)
bitmap = mapimage
bitmap.Save(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Jpeg)
End Try
plz correct my code
--
View this message in context: http://www.nabble.com/hlite-query-tf3844776.html#a10888185
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list