Multi-level Maps

ID #1041

05. How to change the colors of each region on the map?

To change the colors of the first level of the map, open map.xml in the data folder.

In that XML you can find the line like this:

<color>0x04abf2</color>
<color_>0x0000CC</color_>

The first parameter identifies the color of a given region in the normal state, while the second parameter sets the highlighted state color. The colors are specified as hexadecimal values.

If you want to adjust colors on second or further layers, you use the following sequence:

1. Find the map.xml file in the data folder.

2. Open it in any text editor like Notepad and look for a desired name:

...
<name>Alabama</name>
<URL map="us_al.swf" xmlfile1="us_al.xml" xmlfile2="us_al_data.xml">#</URL>
...

Below the name tag you should see the filename of the XML that contains the layer for that particular region. In our case it is us_al.xml – the XML containing the layer with Alabama counties.

3. Open that file in a text editor and look for lines:

...
<color1>0x7798BA</color1> 
<color2>0x366CA3</color2>
...

Each region of the layer should have such color definitions. The first option sets the color in the inactive state, while the second value defines the highlighted color.

For a quick replacement of multiple colors you can use Find/Replace capabilities of your text editor.

Tags: -

Related entries:

Last update: 2011-05-24 14:25
Author: Fla-shop Team
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry