[OpenLayers-Dev] Feature "select detection" implementation details needed

bkausbk bkausbk at web.de
Wed Jun 6 07:20:42 EDT 2007


Dear OpenLayers Users and Developers,

I'm currently studying implementation of OpenLayers components with the aim to
extend it by a specific function. (More later)

I took /examples/select-feature.html for example. If you draw polygons there and
move the mouse over the window each time the mouse is hovering over a polygon
the mouse pointer changes to "hand pointer" and resets to default pointer as
soon as I'm leaving polygon area. But I didn't find any code which is
responsible for this.

In my understanding we need to implement a kind of "hittest" which is able to
detect if a given point is within polygon area. This must be called somewhere in
   OnMouseOver Handler. The only thing I found was OpenLayer.Geometry.atPoint,
but since it is calling OpenLayers.Bounds.containsLonLat whereby
OpenLayer.Bounds only represents rectangular areas this method couldn't be
responsible for this.

How and where is it implemented?

What I want to do is extending OpenLayers by a function to detect:

1. If there are Geometry objects which are intersecting each other
2. Which of the polygons are intersecting (overlaping) each other
3. Find intersection points of specified polygons


regards

Benjamin Kalytta




More information about the Dev mailing list