This example demonstrates one of kmltree's most useful features, state restoration. Load any kml file with the following form, and expand/contract folders, toggle features, etc. Hitting refresh will reload the tree, preserving your changes.