[OpenLayers-Trac] Re: [OpenLayers] #2193: Allow line breaks/newline in SVG vector labels

OpenLayers trac-20090302 at openlayers.org
Sat Mar 5 00:53:10 EST 2011


#2193: Allow line breaks/newline in SVG vector labels
--------------------------------------------+-------------------------------
 Reporter:  Lucent                          |       Owner:  ahocevar    
     Type:  feature                         |      Status:  new         
 Priority:  minor                           |   Milestone:  2.11 Release
Component:  Renderer.SVG                    |     Version:  2.10        
 Keywords:  newline, linebreak, line break  |       State:  Review      
--------------------------------------------+-------------------------------
Changes (by vog):

 * cc: vog@… (added)
  * state:  => Review
  * version:  2.8 => 2.10


Comment:

 Both solutions fail when it comes to re-rendering a label after its text
 and the number of lines have changed. Also both rely on a correctly set
 style.fontSize, but I think that labels should also work if a custom style
 doesn't specify the font size.

 The attached patch (OpenLayers-multi-row-labels.patch) fixes both issues,
 and reuses existing <text> and <tspan> DOM nodes to the maximum possible
 extent. It has been tested in a production environment and appears to work
 flawlessly there.

 Please review it and consider it for inclusion into 2.11.

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


More information about the Trac mailing list