[Mapguide-trac] [mapguide-trac] #2393: Make textsymbol more configurable

MapGuide Open Source trac_mapguide at osgeo.org
Mon Dec 23 07:05:27 PST 2013


#2393: Make textsymbol more configurable
---------------------------+------------------------------------------------
   Reporter:  gabrimonfa   |       Owner:       
       Type:  enhancement  |      Status:  new  
   Priority:  low          |   Milestone:       
  Component:  General      |     Version:  2.5.0
   Severity:  trivial      |    Keywords:       
External_id:               |  
---------------------------+------------------------------------------------
 v. 2.5.2.7949

 textsymbol.templ in mapguide/webserverextensions/www/viewerfiles has many
 options that are not configurable, as

 {{{
 <Unit>Points</Unit>
 <SizeContext>DeviceUnits</SizeContext>

 <Rotation>0</Rotation>

 <BackgroundColor>FF000000</BackgroundColor>
 <BackgroundStyle>Transparent</BackgroundStyle>
 <HorizontalAlignment>Center</HorizontalAlignment>
 <VerticalAlignment>Baseline</VerticalAlignment>
 }}}

 I suggest to transform them in %s and to modify the functions that use the
 template in order to accept more parameters (with default values equals to
 those actually written in the template, in order to let older code run
 without modifications).

 F.i. in layerdefinitionfactory.php

 {{{
 static function CreateTextSymbol($text, $fontHeight, $foregroundColor)
 }}}

 should become something like

 {{{
 static function CreateTextSymbol($text, $fontHeight,
 $foregroundColor,
 $unit='Points',
 $sizeContext='DeviceUnits',
 $rotation=0,
 $font='Arial',
 $backgroundColor='FF000000',
 $backgroundStyle='Transparent',
 $horizontalAlignment='Center',
 $verticalAlignment='Baseline')
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/2393>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list