Below the Radar
Below the Radar

Reputation: 7635

Google Maps API - Multiple layers from the same fusiontable

Is it possible to load many different layers from the same fusiontable in a map? Im trying that, and its not working. Is it a limitation with fusiontablelayer?

    var Mu = new google.maps.FusionTablesLayer({
        query: {
            select: 'geometry',
            from: '1Md0G-C9PCc4ulq7hDyOPn8ZCaJ0a5WHyATrPC3Q',
            where: "name = '02005'"
        },

            styles: [{
                polygonOptions: {
                    fillColor: "#ff9900",
                    fillOpacity: 0.7,
                    strokeColor: "#808080",
                    strokeWeight: 6
                }
            }]

    });
    Mu.setMap(map);

    var mun = new google.maps.FusionTablesLayer({
        query: {
            select: 'geometry',
            from: '1Md0G-C9PCc4ulq7hDyOPn8ZCaJ0a5WHyATrPC3Q',

        },

            styles: [{
                polygonOptions: {
                    fillColor: "#008000",
                    fillOpacity: 1.0,
                    strokeColor: "#000080",
                    strokeWeight: 1
                }
            }]

    });
    mun.setMap(map);

Upvotes: 0

Views: 209

Answers (1)

geocodezip
geocodezip

Reputation: 161334

As described in the documentation under "Limits", it is possible to load up to 5 FusionTablesLayers on a single map (shouldn't matter whether it is from the same table or multiple tables), only one of those layers can be dynamically styled with up to 5 styles.

Upvotes: 1

Related Questions