Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the Google Maps API v3 I'm displaying points derived from a Fusion Table by specifying a FusionTablesLayer

Is it possible to set a minimum/maximum scale on this layer, so it turns off when zooming out?

EDIT: I'm presuming that I'll need to listen to the map's zoom_changed event, and handle the visibility manually. But how can I change the visibility of a Fusion Tables layer?

A marker has the boolean property Visible and the method SetVisible() but I can't see an equivalent for a layer.

An overlay can have show/hide methods - do I need to build my Fusion Tables layer as an overlay? (I'm a Google Maps novice so I don't know much about overlays vs layers)


share|improve this question
up vote 2 down vote accepted

This seems to work - it doesn't seem to be a problem to call setMap if it's already set:

google.maps.event.addListener(map, 'zoom_changed', function() {
    zoomLevel = map.getZoom();
    if (zoomLevel >= minZoomLevel) {
    } else {

Thanks to Chris Broadfoot from the GM team for this tip.

share|improve this answer

I've found this. Check out the xml file which in this case is used in a blog as a module. use the html and javascript of this file and you have a working example of 2 layers on and off capabilities. Also I need to point out that only 5 fusion tables layers can be uses due to google limitations. I have not tried it with more in the javascript code to see what happens but I'm pretty sure if you add more than 5 on the list the 6th won't appear.

So it would be a great thing to add a limitation in the list. You could have for example 10 layers but only 5 can be loaded every time.

Hope this helps because it sure helped me.

share|improve this answer
that's a great resource - thanks very much for sharing – Stephen Lead Dec 11 '11 at 22:50

Fusion Layer Control

    function updateHeatmap() {
  var heatmap = document.getElementById('heatmap');
    heatmap: {
      enabled: heatmap.checked

Official Example with code:

share|improve this answer
Thanks, but that seems to toggle the layer between points/heatmap, not to toggle visibility? see FusionTablesLayerOptions – Stephen Lead Nov 30 '11 at 20:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.