[OpenLayers-Trac] [OpenLayers] #3238: use rectangle to determine hit on image instead of rendering to dedicated graphic hit canvas

OpenLayers trac-20090302 at openlayers.org
Fri Apr 1 19:14:43 EDT 2011


#3238: use rectangle to determine hit on image instead of rendering to dedicated
graphic hit canvas
-----------------------------+----------------------------------------------
 Reporter:  tschaub          |       Owner:  crschmidt   
     Type:  feature          |      Status:  new         
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Renderer.Canvas  |     Version:  2.10        
 Keywords:                   |       State:              
-----------------------------+----------------------------------------------
 Currently, when the user styles a point with an external graphic, we
 render this graphic to a dedicated graphic hit canvas and then render just
 the visible pixels with an identifiable color to the main hit canvas.
 This has the benefit of only counting hits when an event coincides with a
 non-transparent pixel in the external graphic.  The drawbacks are that it
 brings extra overhead and limits external graphics to the same origin
 policy.

 The hit detection for external graphics can be simplified by rendering a
 rectangle on the hit canvas that is the same size as the graphic on the
 display canvas.  With this method, we get rid of extra pixel manipulation
 and avoid same origin constraints.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3238>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list