Changeset 3259 for DPPP


Ignore:
Timestamp:
22/01/08 16:55:41 (12 years ago)
Author:
mkochan
Message:

Changed quadrize_stations.py to disable opening of the main folder with stations (un/checking it still toggles its in/visibility)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/prototypes/quadrize_stations.py

    r3258 r3259  
    130130    return placemarkElement 
    131131 
     132def buildCheckHideChildrenStyleElement(): 
     133    listStyleElement = Element('ListStyle') 
     134    SubElement(listStyleElement, 'listItemType').text = 'checkHideChildren' 
     135    styleElement = Element('Style') 
     136    styleElement.set('id', 'checkHideChildrenStyle') 
     137    styleElement.append(listStyleElement) 
     138    return styleElement 
     139 
    132140def wrapRootFolderElement(rootFolderElement): 
    133141 
     
    148156                elem.tail = i 
    149157     
     158    SubElement(rootFolderElement, 'styleUrl').text = '#checkHideChildrenStyle' 
     159 
    150160    kmlDocumentElement=Element('Document') 
    151161    SubElement(kmlDocumentElement, 'name').text='Example quadrization run' 
    152162    SubElement(kmlDocumentElement, 'open').text='1' 
     163    kmlDocumentElement.append(buildCheckHideChildrenStyleElement()) 
    153164    kmlDocumentElement.append(rootFolderElement) 
    154165 
     
    169180 
    170181# Write the KML document to a file 
    171 kmlTree = ElementTree(kmlRootElement)        
     182kmlTree = ElementTree(kmlRootElement) 
    172183kmlFile = open('../../output/quadrize.kml', 'w') 
    173184kmlTree.write(kmlFile) 
Note: See TracChangeset for help on using the changeset viewer.