Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have some data that I would like to display in greater detail as the user zooms into the interactive Gooogle map. Does google support dynamically turning layers on and off depending on the scale?

share|improve this question
add comment

2 Answers 2

This is how it can be done: (taken from http://gis.stackexchange.com/a/17434/5436)

google.maps.event.addListener(map, 'zoom_changed', function() {
zoomLevel = map.getZoom();
  if (zoomLevel >= minZoomLevel) {
    FTlayer.setMap(map);
  } else {
    FTlayer.setMap(null);
  }
}); 
share|improve this answer
add comment

You may use the Region and LoD KML elements:

Lod Lod is an abbreviation for Level of Detail. describes the size of the projected region on the screen that is required in order for the region to be considered "active."

You need to convert the zoom level value into screen pixel size.

I know it works in G-Earth - I suppose it works in G-Map...

share|improve this answer
add comment

Your Answer

 
discard

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.