
Setup

    >>> import transaction
    >>> root = getRootFolder()
    >>> from zope.app.folder import Folder
    >>> root['places'] = Folder()
    >>> places = root['places']
    >>> from zope.dublincore.interfaces import IWriteZopeDublinCore
    >>> dc = IWriteZopeDublinCore(places)
    >>> dc.title = u'Test Places'
    >>> dc.description = u'Places for testing'
    >>> places['a'] = Folder()
    >>> placemark = places['a']
    >>> dc = IWriteZopeDublinCore(placemark)
    >>> dc.title = u'Placemark A'
    >>> dc.description = u'A first testing placemark'
    >>> from zgeo.geographer.interfaces import IWriteGeoreferenced
    >>> geo = IWriteGeoreferenced(placemark)
    >>> geo.setGeoInterface('Point', (-105, 40))

    #transaction.commit()

Test the KML document view of the places folder

    >>> print http(r"""
    ... GET /places/@@kml-document HTTP/1.1
    ... Authorization: Basic mgr:mgrpw
    ... """)
    HTTP/1.1 200 Ok
    Content-Length: 883
    Content-Type: application/vnd.google-earth.kml+xml;charset=utf-8
    <BLANKLINE>
    <?xml version="1.0" encoding="utf-8"?>
    <kml xmlns="http://earth.google.com/kml/2.2">
    <BLANKLINE>
      <Document>
        <Style id="defaultStyle">
          <LineStyle>
            <color>ffff0000</color>
            <width>2</width>
          </LineStyle>
          <PolyStyle>
            <color>33ff0000</color>
          </PolyStyle>
        </Style>
        <name>Test Places</name>
        <visibility>1</visibility>
        <open>0</open>
        <Placemark>
          <name>Placemark A</name>
          <description>
            <![CDATA[
              <div>
                <p>A first testing placemark</p>
                <p>URL: 
                  <a href="http://localhost/places/a">http://localhost/places/a</a>
                </p>
              </div>
            ]]>
          </description>
          <styleUrl>#defaultStyle</styleUrl>
          <Point>
            <coordinates>-105.000000,40.000000,0.0</coordinates>
          </Point>
    <BLANKLINE>
    <BLANKLINE>
        </Placemark>
      </Document>
    </kml>
    <BLANKLINE>

