Search
Clear search
Close search
Google apps
Main menu

Fusion Tables is an experimental app.

Fix: Map style doesn't appear

Symptom

I've used the Fusion Tables Layer wizard or otherwise generated code for including a Fusion Table map in a webpage using the Google Maps API. 

However, the map style I created in Fusion Tables doesn't appear on the new map.

Solution

Fusion Tables now supports multiple styles per table. You'll need to reference the correct one or you won't get the style you configured. Legacy code examples did not need to address this. 

The same problem and fix apply to the templates for map info windows, too.

Here's an example of setting the style id and template id. This code sets the style id to 2, and the template id to 2.

 

var layer = new google.maps.FusionTablesLayer({ 
  query: { 
    select: locationColumn, 
    from: tableId 
  }, 
  styleId: 2, 
  map: map 
}); 

How to find the style id and template id for any map tab