KML

Revision as of 15:31, 8 November 2013 by Arthur Lathrop (talk | contribs)

Revision as of 15:31, 8 November 2013 by Arthur Lathrop (talk | contribs)

KML stands for Keyhole Markup Language and is a file format used to display geographic data in Earth browsers such as Google Earth, Google Maps and Google Maps for Mobile. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. KML uses a tag-based structure with nested elements and attributes and is based on the XML standard. It contains boundary coordinates and placemark information for multiple zones.

There are three ways KML features can be used with SmartSimple.

  1. Upload a KML file to an XML field
  2. Enable KML on a custom field
  3. Use a System Variable to store a link to a public KML file

Uploading a KML File to an XML Field

Enabling KML on Custom Fields

KML can be enabled on the following custom field types:

To do so, edit the custom field and, under General Options, select the "Enable KML" option:
EnableKML.png

Fields that contain SmartSimple KML Variables will display as a "View Map" button in view mode:

KMLFieldEditMode.png KMLFieldViewMode.png
Field in Edit Mode Field in View Mode

In this case, California will be highlighted on the Google Map, and census information will be available.

CaliforniaMap.png

SmartSimple KML Variables currently supported are:

  • @geo.us.states, for U.S. States
  • @geo.us.counties, for U.S. counties and
  • @geo.ca.provinces, for Canadian provinces.

SmartSimple KML Variable Syntax

To highlight only two U.S. counties @geo.us.counties.Washington-Ferry@,@ geo.us.counties.North Dakota-Renville@
or
@geo.us.counties.Washington-Ferry,North Dakota-Renville@
(both return the same map overlays)
To only show Washington State @geo.us.states.washington@
To show all U.S. counties @geo.us.counties.*@

Storing Public KML Files to System Variables

You can add public *.kml and *.kmz files as "System Map Overlays" to every map generated by a KML-enabled field:

  • Create a System Variable whose Name begins with the characters "KML-"
  • The System Variable Value will be the URL leading to the KML file on the Internet.

ExamplePublicKML.png

  • All such System Variables will be displayed as selectable overlays on the left-hand side of Google Maps opened with KML-enabled custom fields.
  • The label of the selectable overlay will the characters in the System Variable Name to the right of the "KML-" characters. So a System Variable named "KML-Bicycle Shelters" will be labeled "Bicycle Shelters" on the Google Map.

KMLBikeShelterExample.png
See System Variables page for additional information.Template:UnderConstruction