[OpenLayers-Trac] Re: [OpenLayers] #3207: hit detection with canvas

OpenLayers trac-20090302 at openlayers.org
Wed Mar 30 20:10:10 EDT 2011


#3207: hit detection with canvas
-----------------------------+----------------------------------------------
 Reporter:  tschaub          |       Owner:  tschaub     
     Type:  feature          |      Status:  assigned    
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Renderer.Canvas  |     Version:  2.10        
 Keywords:                   |       State:  Review      
-----------------------------+----------------------------------------------
Changes (by tschaub):

  * state:  => Review


Comment:

 Ok, the latest patch is ready for review.

 This patch contains a number of changes to the canvas renderer.  The
 primary change is to support hit detection based on the symbolizer that
 features are rendered with.  The additional changes are to better deal
 with interior rings in polygons (#2856), to avoid errors rendering
 geometries with NaN coordinate values (#3222), and to store constructor
 options on the renderer (ticket lost in the pile).

 I know it makes review harder to have multiple changes in here, but the
 patches were developed during the development of this functionality, and
 they would require a fair bit more work to apply to the trunk separately.

 It should also be said that this new functionality comes with some
 caveats:
  * There is potential for false positives in hit detection.  I will write
 this up more fully elsewhere, and we can consider a more robust solution
 later.  For now, without many overlapping features, the chances of false
 positives are rare.
  * When using an external graphic, hit detection is currently limited to
 the same origin policy.  The external graphic hit detection is likely
 overly functional, and it could be simplified to do hit detection in a
 rect representing the rendered image (currently it respects transparency
 in graphics).  This enhancement would come with a performance gain and
 would get around the same origin policy.

 I'll ticket these issues separately.

 Thanks for any review.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3207#comment:7>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list