0

The "new" look for Google Fusion Tables allows you to create multiple "map" tabs (and others like "charts" and "summary"). My question is: how do you use Google Maps API to call a specific map tab you have created? For example, you may have a map tab you have designed with the following URL:

https://www.google.com/fusiontables/data?docid=1InbiFbInR8OGcMgOngf3j2Bb2FTpEkZQuT1hNMo#map:id=4

The fusion table id is 1InbiFbInR8OGcMgOngf3j2Bb2FTpEkZQuT1hNMo, and the map:id = 4. So in Google Maps API, you can layer this table as:

crime = new google.maps.FusionTablesLayer({
    query: {
        select: 'Address',
        from: '1InbiFbInR8OGcMgOngf3j2Bb2FTpEkZQuT1hNMo'
    },
});
crime.setMap(map);

But this will not apply any of the stylings or infowindows you may have done on your map tab. How do I tell Google Maps API to grab a specific map tab?

FYI, switching to "classic" view let's me apply a single map style to the fusion table that DOES get applied by the code above.

Thanks!

4

1 回答 1

0

您需要应用视图的styleIdand templateId。单击特定选项卡->发布->获取 HTML 和 Javascript,您将获得所需的内容。

于 2013-04-18T22:55:14.307 回答