Stylistic Marker Icons - Merge Tables

This is offered as an aid to other beginners such as myself.

For a long time I tried to understand how to assign different icons to different categories of markers in my merge table project. I found the documentation limited and confusing, and I believe that if I was confused, others probably did too.

With the help of others and many tests, I can share with you two ways to achieve this.

First of all, the icons available for merge tables are very limited, from one set that you can see here: http://www.google.com/fusiontables/DataSource?dsrcid=308519
Zoom in on the ocean and click to the ones you like to find out their names.

1. Styling from the weld table:
Create a column with the name of the "Styles" type. Be sure to set its TYPE as TEXT.
In the column, add the icon names that you want to use for different categories.
Examples of names are star, target, and red_blank.
When you are in map view, press the CONFIGURATION STYLE button. In the "Points / Marker Icons" section, select "Column." Click "Use the icon indicated in the column", and in the drop-down list, select the column name that you specified, for example. "Styles."
Browse the map and you will see various icons.

2. javascript:
. ( Styles ):

layer_2 = new google.maps.FusionTablesLayer({
  suppressInfoWindows:true,
  query: {
    select: 'Location',
    from: 'tableid' //add the id number of your table here, inside the quotes
  },

styles: [
  {where: "'style' = 14", markerOptions:{ iconName:"star"}}, // other landmarks
  {where: "'style' = 13", markerOptions:{ iconName:"wht_pushpin"}}, //businesses
  {where: "'style' = 11", markerOptions:{iconName:"red_blank"}}, //town houses
  {where: "'style' = 12", markerOptions:{ iconName:"orange_blank"}}, //country homes
  {where: "'style' = 15", markerOptions:{ iconName:"target"}},
  ]});

. , , , , , javascript, .

, JS " ", , , "" .

, .

+5
3

, , Merge, , / :

Merge

+2

Also note that for unknown reasons, you can get different results in the classic and current merge table interface. My fusiontablelayer did not show the correct styles on my map, although everything looked good on the visualization of the merge table, but when I switched to the classic and reset icon column and fixed the infoindu style, everything fell into place. Strange, but it worked.

0
source

All Articles