Font Style Type Parameters | ||||||||||||||||||||||||||||||||||||
As you already know, using the font style type, you can control the visual properties of all the text on the map. The following properties are extended by the font type. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
Font family, size & color | ||||||||||||||||||||||||||||||||||||
The basic attributes of the font are its
font family, size and color which can be set using
the aforementioned attributes. e.g., <style name='MyFirstFontStyle' type='font' font='Verdana' size='12' color='FF0000' /> |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
Here, font should refer to a font family which is present on the end users system (else the default system font would be used to draw text). Color should be in Hex code without any #. |
||||||||||||||||||||||||||||||||||||
bold, italic & underline | ||||||||||||||||||||||||||||||||||||
To decorate your text, you can use any of the above
parameters as under: <style name='MyFirstFontStyle' type='font' font='Verdana' size='12' color='FF0000' bold='1' italic='1' underline='1' /> |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
The above code will make sure that your font appears as bold, italicized and underlined. |
||||||||||||||||||||||||||||||||||||
bgColor and borderColor | ||||||||||||||||||||||||||||||||||||
If you intend to put a border
color or a background
color for your text boxes on the map, you can
use the above two parameter to define hex color code (without #)
as under: <style name='MyFirstFontStyle' type='font' font='Verdana' size='12' color='FF0000' bgColor='FFFFDD' borderColor='666666' /> |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
isHTML | ||||||||||||||||||||||||||||||||||||
This attribute is particularly useful, when you have HTML characters as a part of your text e.g., "< 5" or "> 5" etc. By default, FusionMaps renders all text as HTML and as such "< 5" will be treated as a non-closing HTML tag and wouldn't be displayed at all. For example, if you've to display
"< 5" for a color range value, you would use: <style name='LegendFont' type='font' font='Arial' size='10' isHTML='0' /> And, applied as under: <apply toObject='Legend' styles='LegendFont' /> |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
leftMargin and letterSpacing | ||||||||||||||||||||||||||||||||||||
leftMargin lets you set the left margin of the text (in points) and letterSpacing allows you to control the space that is uniformly distributed between characters - the value specifies the number of pixels that are added to the space after each character. A negative value condenses the space between characters. |
||||||||||||||||||||||||||||||||||||
e.g., <style name='MyFirstFontStyle' type='font' font='Verdana' size='12' color='FF0000' bgColor='FFFFDD' borderColor='666666' leftMargin='10' letterSpacing='3'/> |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|