As introduced in set map styles, you can tell Fusion Tables to look in a particular column to determine the icon or color of map features. You can use the merge tables feature in Fusion Tables to quickly assign icon names or color names to rows in a table based on categories, and avoid laboriously editing the original table.
Let's say that one column in your data always contains one of a short list of values. For example, it may contain either "Republican", "Democrat" or "Independent" like the Sponsoring party column shown below.
|Rally in the Park||101 Park avenue, Maintown||Democrat|
|Party Hearty||101 Main Street, Maintown||Democrat|
|Rally Around||Penthouse suite, Hotel Fancy, Maintown||Republican|
|Rally in the Streets||300 Market Street, Maintown||Republican|
|Fun Times||1000 Avenida Independencia, South Maintown||Independent|
You'd like to use a different icon for each row on the map:
If you create a second table with this legend and merge it with your original table, you'll have a new, merged table with the icons assigned to each category. You can then create a map and style it using the icon names column.
The same features are supported in the New look.
You do this in several phases:
- Create a second table with the legend information.
- Merge it with your original table.
- Map it and apply the icon style.
1. Create a second table with the legend
- Create a table similar to this one.
It's easy to use Google Spreadsheets or any spreadsheet editor. The file can be a Google Spreadsheet, Excel spreadsheet, or .csv file. Make sure the text in the Category column exactly matches the entries in your original data table:
Category Icon name Republican large_red Democrat large_blue Independent large_yellow
To color a line or polygon instead, make a table like this one. In the "Color" column, use the hex code or color name. See how to style map for more details.
Category Color Republican #FF0000 Democrat #0000FF Independent #FFFF00
- Create a new Fusion Table by importing your new file.
- Copy the URL for this new table from the URL bar in your browser.
2. Merge it with your original table
- Open your original data table.
- Click Merge.
- Paste the URL into "merge with:" and click Get.
- On the left, select the radio button next to the column with categories.
- On the right, make sure the "Category" radio button is selected.
- Give the table a new name, and click "Merge."
The merged table will show the new column with a different background color. In our example:
|Event||Location||Sponsoring party||Icon name|
|Rally in the Park||101 Park avenue, Maintown||Democrat||large_blue|
|Party Hearty||101 Main Street, Maintown||Democrat||large_blue|
|Rally Around||Penthouse suite, Hotel Fancy, Maintown||Republican||large_red|
|Rally in the Streets||300 Market Street, Maintown||Republican||large_red|
|Fun Times||1000 Avenida Independencia, South Maintown||Independent||large_yellow|
3. Map it and apply the icon style.
- In the merged table, click Visualize > Map.
- Click "configure styles."
- With "Icon" or "Polygon fill" as appropriate selected on the left, click "by column."
- Make sure the radio button is selected next to "by column."
- Choose the new "Icon name" or "Color" column from the pull-down menu.
- Press Save.
Bonus! To change the icon style, simply edit the legend table. The map in the merged table will update the next time it is loaded.