[OpenLayers-Trac] Re: [OpenLayers] #2965: Add halo's to vector labels

OpenLayers trac-20090302 at openlayers.org
Fri Mar 4 11:24:22 EST 2011


#2965: Add halo's to vector labels
----------------------+-----------------------------------------------------
 Reporter:  rdewit    |       Owner:                  
     Type:  feature   |      Status:  new             
 Priority:  minor     |   Milestone:  2.11 Release    
Component:  Renderer  |     Version:  2.10            
 Keywords:            |       State:  Needs Discussion
----------------------+-----------------------------------------------------
Changes (by lasmasi):

 * cc: lasmasi (added)


Comment:

 Hi,

 This is a great patch and much needed functionality but I think there
 might be a bug.
 I am labeling features dynamically by using their attributes.

 {{{
 var myStyle = OpenLayers.Util.applyDefaults({
 "label": '$(label)',
 "labelHaloColor": 'green',
 "labelHaloWidth": '1'
 })
 }}}

 Unfortunately, after I change feature's label through it's properties,
 label & halo on the screen do not update properly. It seems that only halo
 is being re-rendered. On feature change, I am also forcing vector layer
 refresh and redraw but with no success. I am using FireFox and Chrome.

 {{{
 feature.layer.refresh(true);
 feature.layer.redraw();
 }}}

 This is how it looks when I update label 'Test linestring' to 'Test
 linestring another string':

 [[Image(halo_render.png)]]

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


More information about the Trac mailing list