Search code examples
kmlgoogle-earth

Nested Polygons and Balloons


There is polygon inside a bigger polygon in Google Earth. Smaller polygon also has descriptive balloon, that shows info when i click on it.. But, if I add balloon to bigger polygon, the smaller polygon just isn't accessible, i.e, no balloon shows up in there??

Is there a way to set the zoom scaling to fix that a smaller polygon is visible afterward this scale. And when clicked, the smaller polygon's balloon is showed. Any references to kick start this approach?

Is is possible alone in Google earth?


Solution

  • Yes, you can achieve this by nesting Kml regions. Basically you would wrap each polygon in a region. Each region would have a set of LOD (Level of detail) limit to specify the required size (zoom/range) for the associated Region to be active. This way the large polygon would be visible and active at a certain distance, then at a closer distance, the smaller polygon would be visible and active.

    This is possible to do directly in Google Earth by manipulating/creating the Kml as desired. Alliteratively you could write the kml in any text editor and simply load it into the application.

    For more information see - Nesting Regions http://code.google.com/apis/kml/documentation/regions.html#nestingregions