[MAPSERVER-USERS] Highlighting query results
BrainDrain
paulborodaev at gmail.com
Tue Sep 2 22:32:38 PDT 2008
Instead of draw query I use map.saveQuery to file and then 'queryFile' param
of mapserv cgi. I think it is useful too (C# mapscript slower then cgi on
windows).
Steve Lime wrote:
>
> MapServer supports what's called a query map. It basically replaces the
> color of the top-most
> style for a layer with one defined in the query map object (default is
> yellow). Typically in MapScript
> you'd do:
>
> a_layer.queryByAttributes(m_map, null, a_query, 1);
> img = m_map.drawQuery();
>
> You can of course get fancier and step through the result set by hand but
> I wouldn't recommend
> starting that way.
>
> Steve
>
>
>>>> On 9/2/2008 at 9:14 AM, in message
> <E1KaWeU-0008jG-00.shurhenv-mail-ru at f10.mail.ru>, shurhen
> <shurhenv at mail.ru>
> wrote:
>> Hi!
>>
>> I'm newbie in mapserver :)
>>
>> I need to highlight query results. I wanna select object by attribute and
>> then highlight it. But I've not found any information how can I do this.
>> Most
>> of GIS have possibility to highlight selected objects, therefore I
>> suppose
>> what MapServer has this ability too. "Selected" means to highlight object
>> when I click at it, and to return to its previous color when I click at
>> another object.
>> I've found similar question
>>
>> http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0309/msg00063.html
>>
>> but unfortunately it remains without any answer :(
>>
>> If there is no way except to color selected object manually, please help
>> me
>> to do this too.
>>
>> Here is Mapscript code example based on the info what I found on this
>> site:
>>
>> a_layer.queryByAttributes(m_map, null, a_query, 1);
>> using (resultCacheObj results = a_layer.getResults())
>> {
>> if (results != null && results.numresults > 0)
>> {
>> a_layer.open();
>> for(int i = 0; i < results.numresults; i++)
>> {
>> resultCacheMemberObj a_result =
>> results.getResult(i);
>> shapeObj a_obj =
>> a_layer.getFeature(a_result.shapeindex, a_result.tileindex);
>>
>>
>>
>> // WHAT NEXT??
>>
>>
>> }
>> a_layer.close();
>> }
>> }
>>
>> PS Sorry for my English, but I hope you've understood me
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
View this message in context: http://www.nabble.com/Highlighting-query-results-tp19271759p19283148.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list