[mapguide-users] Polygon highlight on mouse hover

Kenneth, GEOGRAF A/S ks at geograf.dk
Thu Aug 9 03:58:46 EDT 2007


You can request a completely seperate map image from the server.
That map could be made so it contains the required polygon with a 
highligt color.

It will be at least as slow as the method you have outlined.
There is no way this will work fast enough to be useable.

The problem is that the AJAX client has no knowledge about the extent of 
the indiviual geometries.
This means that every request has to be passed on to the server.
If you download the geometry data, you might be able to get the 
Javascript to work fast enough.
However, I have yet to see a Javascript that is able to render an 
arbitrary image without server help.

I don't belive this is doable without relying on a browser component 
capable of rendering an image.

Regards, Kenneth, GEOGRAF A/S



HYS skrev:
> in ajaxmappane.templ I inserted the following (around line 1085). Within the
> onMouseMove function.
>
>     if(tool==0) {
>       pt = ScreenToMapUnits(x, y);
>       RequestCircleSelection(pt.X, pt.Y, 200, false);
>     }
>
> It automatically selects whithout the user having to click. But it's too
> slow to work as a proper highlight function. My other idea to make a new
> layer with a filter to let the object have its own style. (Or to add a theme
> with condation for that object) won't be fast enough for a proper highlight
> functionality.
>
> The problem is that the selection is rendered at the server and a whole new
> image for the map has to be made and transferred. Would it be possible to
> create a new image as overlay? So only the highlighted (or selected) object
> has to be rendered?
>
>
> Dhirendra Kumar wrote:
>   
>> Hi All,
>>
>> I want to highlight polygon border with diferent color when mouse pointer
>> enter in polygon. Any one please help me. Thankyou in Advance.
>>
>> Regards,
>>
>>  Dhirendra Kumar 
>>
>>     
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070809/a6bb3bc0/attachment.html


More information about the mapguide-users mailing list