Metadata and Microformat Examples

Metadata and Microformats Using a Template Feature

This example shows a metadata file where the feature data is extracted from the shape files by referencing DBF fields. Take a look at the <feature> tag and notice the attribute key="TEMPLATE". This tells Maprosoft that this is the generic layout for all features in the shape file. Within the template, you will notice text in the form {@Field field-name}. For each record in the shape file, Maprosoft substitues this text with the value from the DBF field named field-name.

<?xml version="1.0" encoding="UTF-8"?>
<shapeFileMetaData>
  <shapeTypeMetaData>
    <featureType>
      <featureTypeName>
        Schools
      </featureTypeName>
      <shapeType>
        POINT
      </shapeType>
      <areaOfInterest>
        false
      </areaOfInterest>
    </featureType>
    <featureTypeConfig>
      <groupName>
        Community
      </groupName>
      <displayOrder>
        15
      </displayOrder>
      <initiallyVisible>
        false
      </initiallyVisible>
      <pointIconType>
        SCHOOL
      </pointIconType>
    </featureTypeConfig>
    <dbfFieldMapping>
      </keyFieldName>
        SchoolID
      </keyFieldName>
      <nameFieldName>
        SchoolName
      </nameFieldName>
    </dbfFieldMapping>
  </shapeTypeMetaData>
  <featureMetaData>
    <feature key="TEMPLATE">
      <title>
        <text>{@Field SchoolName}</text>
      </title>
      <html-content>
        <header>
          Details
        </header>
        <body>
          <![CDATA[
            Level: {@Field SchoolLevel}
            <br/>
            School Type: {@Field SchoolType}
            <br/>
            Number of Students: {@Field NumberOfStudents}
          ]]>
        </body>
      </html-content>
      <contactDetails>
        <department>
          General Enquiries
        </department>
        <phoneNum>
          {@Field SchoolPhone}
        </phoneNum>
        <faxNum>
          {@Field SchoolFax}
        </faxNum>
        <email>
          
        </email>
        <website>
          
        </website>
      </contactDetails>
      <address>
        <streetNum>
          
        </streetNum>
        <streetName>
          {@Field StreetAddress}
        </streetName>
        <suburbName>
          {@Field Suburb}
        </suburbName>
        <state>
          {@Field State}
        </state>
        <postcode>
          {@Field Postcode}
        </postcode>
        <country>
          {@Field Country}
        </country>
      </address>
    </feature>
  </featureMetaData>
</shapeFileMetaData>

Microformats for a Single Park

This example shows the meta data for a specific park. Note that only the content of one <feature> is shown.

<title>
  Cook &amp; Phillip Park
</title>
<image>
  <url>
    http://www.etc.com/cook-phillip-park.jpg
  </url>
  <width>
    320px
  </width>
  <height>
    418px
  </height>
  <altText>
    Cook &amp; Phillip Park
  </altText>
</image>
<parkFeatures>
  <playgroundDescription>
    Small enclosed
  </playgroundDescription>
  <sportsFieldDescription>
    Two basketball courts
  </sportsFieldDescription>
  <courtsDescription>
    
  </courtsDescription>
  <publicToilets>
    no
  </publicToilets>
  <bbqFacilities>
    no
  </bbqFacilities>
  <basketballCourts>
    yes
  </basketballCourts>
  <otherFeaturesDescription>
    Off-leash area, aquatic centre, water features
  </otherFeaturesDescription>
</parkFeatures>