[OpenLayers-Trac] Re: [OpenLayers] #2839: canvas enhancements

OpenLayers trac-20090302 at openlayers.org
Fri Mar 4 08:55:08 EST 2011


#2839: canvas enhancements
-----------------------------+----------------------------------------------
 Reporter:  tschaub          |       Owner:  crschmidt   
     Type:  feature          |      Status:  new         
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Renderer.Canvas  |     Version:  2.10        
 Keywords:                   |       State:              
-----------------------------+----------------------------------------------
Changes (by rduivenvoorde):

 * cc: rduivenvoorde (added)


Comment:

 See patch2839

 One problem that arises (specially on the native browser of Android mobile
 devices) is the fact that it is hard to select a point-geometry,
 especially when it has a style with eg a pointRadius of 30: you are sure
 you are pointing to the big dot, but still missing it. you really have to
 click on the exact location of the point.

 The way an event is related to a geometry now in canvas is:
 1) build a small box of 5 pixels around the xy event
 2) relate that box with an intersect to a geometry

 This patch turns this around for Point geometries: instead of relating a
 5px box with the point, we take the style of the point and grow the
 'event'-box that size and see if this relates to a geometry.

 Myself I already see the disadvantages of my solution:
 1) for points we generate a geom-object for every feature... (the reason I
 do the making of the evtGeom IN the loop is because I think it is possible
 to have different styles for different geometries within a layer (rule
 based styling)
 2) a point can also have a externalGraphic, translated in space ...

 But... this is a start :-) it fixes my problem for now.

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


More information about the Trac mailing list