4

I've implemented a fusion table map to create country fills for my google map... however I really need to get rid of the infowindows / cards that pop up when you click a country. I tried to just format the card so that there's no actual content, but it hasn't changed the cards at all. They still show all the same data, so it isn't even an empty card.

How do I do this? I assume it's probably something I need to implement in the actual javascript for the google map, since that's where I styled the shapes. I've seen balloonVisibility for KML, though that was for Google Earth and I wasn't really sure if that applied (or if so, how to use that: https://developers.google.com/kml/documentation/kmlreference#balloonstyle)

FUSION TABLE: https://www.google.com/fusiontables/DataSource?docid=1LfVcxsno9k3l2zgKS_fwoyv9vc-ba7aoQEz0aKM

GOOGLE MAP LIVE: http://jsbin.com/ukepah/3/

CODE VIEW: http://jsbin.com/ukepah/3/edit

Here's the specific code bringing the KML/country shapes to the google map:

        var layer = new google.maps.FusionTablesLayer({
            query: {
                select: 'geometry',
                from: '1LfVcxsno9k3l2zgKS_fwoyv9vc-ba7aoQEz0aKM'
            },
            styles: [{
                polygonOptions: {
                fillColor: '#5E5E5E',
                fillOpacity: 0.3
                }
              }]
            });
        layer.setMap(map); 
        }

1 Answers1

6

I typically use {suppressInfoWindows:true} in the constuctor.

{clickable:false} might work for you as well.

This is the constructor for the FusionTablesLayer with the suggested modification:

   var layer = new google.maps.FusionTablesLayer({
        suppressInfoWindows: true,
        query: {
            select: 'geometry',
            from: '1LfVcxsno9k3l2zgKS_fwoyv9vc-ba7aoQEz0aKM'
        },
        styles: [{
            polygonOptions: {
            fillColor: '#5E5E5E',
            fillOpacity: 0.3
            }
          }]
        });
    layer.setMap(map); 
    }
geocodezip
  • 158,664
  • 13
  • 220
  • 245
  • 1
    Thank you! This is probably a dumb question, but where should I put that exactly? How do I add a "constructor"? I'm sure it's very obvious but JavaScript and I do not have a long history together, to put it lightly. – user1876913 Dec 17 '12 at 18:34