hilite and zoom query in c#
sonj
sonj_you at YAHOO.CO.IN
Thu May 31 00:23:49 PDT 2007
Hi,
My code working fine bcz of just adding TEMPLATE in .map file ( ex: TEMPLATE
"C:\..\..\test.html"). So you may get an idea.
Regards
sonj
sonj wrote:
>
> Hi,
>
> For me also same problem. Is there any success at your end ?
> I tryed this code
> result = myLayer.queryByAttributes(map,"MAPNAME","[MAPNAME]=='" +
> txtUser.Text + "'",0);
> Error : Requested layer has no templates defined so is not queryable
>
>
> lakku wrote:
>>
>> 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
>>
>>
>
>
<^O^><^O^><^O^>
--
View this message in context: http://www.nabble.com/hilite-and-zoom-query-in-c--tf3826164.html#a10888645
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list