Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2013, Ringo Wathelet
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* - Neither the name of "scalakml" nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.scalakml.kml
import com.scalakml.atom._
import com.scalaxal.xAL.AddressDetails
import com.scalakml.gx.LatLonQuad
import scala.collection.mutable
/**
* package of classes and constructs for the Google KML Version 2.2 model
*
* @author Ringo Wathelet
* Date: 12/12/12
* Version: 1
*
* References: OGC 07-147r2 Version: 2.2.0, Category: OGC Standard, Editor: Tim Wilson, at
* http://www.opengeospatial.org/standards/kml
* also
* Google developers KML Reference, at
* https://developers.google.com/kml/documentation/kmlreference
*
* The documentations are taken from these two references.
*/
/**
* Specifies how the is interpreted.
*/
trait AltitudeMode
/**
* Specifies how the is interpreted. Also covers the the Google extension gx
* Possible values are as follows:
*
*
relativeToGround - (default) Interprets the as a value in meters above the ground.
* If the point is over water, the will be interpreted as a value in meters above sea level.
* See to specify points relative to the sea floor.
*
clampToGround - For a camera, this setting also places the camera relativeToGround,
* since putting the camera exactly at terrain height would mean that the eye would intersect
* the terrain (and the view would be blocked).
*
absolute - Interprets the as a value in meters above sea level.
*
from the gx package, relativeToSeaFloor - Interprets the altitude as a value in meters above the sea floor. If the KML feature is above land rather than sea, the altitude will be interpreted as being above the ground.
*
from the gx package, clampToSeaFloor - The altitude specification is ignored, and the KML feature will be positioned on the sea floor. If the KML feature is on land rather than at sea, clampToSeaFloor will instead clamp to ground.
*
*/
object AltitudeMode {
def fromString(value: String): AltitudeMode =
if (value == null) null
else
value.trim match {
case "clampToSeaFloor" => ClampToSeaFloor
case "relativeToSeaFloor" => RelativeToSeaFloor
case "clampToGround" => ClampToGround
case "relativeToGround" => RelativeToGround
case "absolute" => Absolute
case _ => null
}
}
/**
* This mode ignores any altitude value, and places the KML feature on the surface of the ground,
* following the terrain. In this way, GroundOverlays can, for example, be 'draped' over the
* surface of the Earth. If the feature is positioned over a major body of water, clampToGround
* will place the feature at sea level.
* @see AltitudeMode
*/
case object ClampToGround extends AltitudeMode {
/**
*
* @return "clampToGround"
*/
override def toString = "clampToGround"
}
/**
* Measures the altitude from the ground level directly below the coordinates.
* @see AltitudeMode
*/
case object RelativeToGround extends AltitudeMode {
/**
*
* @return "relativeToGround"
*/
override def toString = "relativeToGround"
}
/**
* The absolute altitude mode measures altitude relative to sea level,
* regardless of the actual elevation of the terrain beneath the feature.
* In this way, features can be placed underground, and will not be visible.
* Portions of a feature can extend underground.
* Negative values are accepted, to place features below sea level.
* This altitude mode is useful in situations where the altitude value is known precisely.
* GPS tracks, for example, can use the absolute altitude mode to display paths
* created while flying or diving.
* @see AltitudeMode
*/
case object Absolute extends AltitudeMode {
/**
*
* @return "absolute"
*/
override def toString = "absolute"
}
/**
* The altitude specification is ignored, and the KML feature will be positioned on the sea floor.
* If the KML feature is on land rather than at sea, clampToSeaFloor will instead clamp to ground.
*/
case object ClampToSeaFloor extends AltitudeMode {
/**
*
* @return "clampToSeaFloor"
*/
override def toString = "clampToSeaFloor"
}
/**
* Interprets the altitude as a value in meters above the sea floor.
* If the KML feature is above land rather than sea, the altitude will be interpreted as
* being above the ground.
*/
case object RelativeToSeaFloor extends AltitudeMode {
/**
*
* @return "relativeToSeaFloor"
*/
override def toString = "relativeToSeaFloor"
}
trait ColorMode
/**
* Values for are normal (no effect) and random.
*
*
A value of random applies a random linear scale to the base as follows.
* To achieve a truly random selection of colors, specify a base of white (ffffffff).
*
If you specify a single color component (for example, a value of ff0000ff for red),
* random color values for that one component (red) will be selected. In this case,
* the values would range from 00 (black) to ff (full red).
*
If you specify values for two or for all three color components, a random linear scale is applied to each
* color component, with results ranging from black to the maximum values specified for each component.
*
* The opacity of a color comes from the alpha component of and is never randomized.
*
*/
object ColorMode {
/**
* Creates a specific ColorMode object from the String value, either "normal" or "random"
* @param value the name of the ColorMode to construct
* @return a ColorMode object or null if the value parameter is not a correct ColorMode name or is null
*/
def fromString(value: String): ColorMode =
if (value == null) null else
value.trim match {
case "normal" => NormalValue
case "random" => Random
case _ => null
}
}
/**
* Specifies a single colour value.
* @see ColorMode
*/
case object NormalValue extends ColorMode {
override def toString = "normal"
}
/**
* Specifies to use a random colour value.
* @see ColorMode
*/
case object Random extends ColorMode {
override def toString = "random"
}
/**
* Specifies how the is interpreted.
*/
trait DisplayMode
/**
*
*
If is default, Google Earth uses the information supplied in to create a balloon .
*
If is hide, Google Earth does not display the balloon.
*
* In Google Earth, clicking the List View icon for a Placemark whose balloon's is hide
* causes Google Earth to fly to the Placemark.
*/
object DisplayMode {
/**
* Creates a specific DisplayMode object from the String value, either "default" or "hide"
* @param value the name of the DisplayMode to construct
* @return a DisplayMode object or null if the value parameter is not a correct DisplayMode name or is null
*/
def fromString(value: String): DisplayMode =
if (value == null) null else
value.trim match {
case "default" => Default
case "hide" => Hide
case _ => null
}
}
/**
* Specifies to display the balloon.
* @see DisplayMode
*/
case object Default extends DisplayMode {
/**
*
* @return "default"
*/
override def toString = "default"
}
/**
* Specifies to hide the balloon.
* @see DisplayMode
*/
case object Hide extends DisplayMode {
/**
*
* @return "hide"
*/
override def toString = "hide"
}
/**
* Specifies where to begin numbering the tiles in each layer of the pyramid.
*/
trait GridOrigin
/**
* Specifies where to begin numbering the tiles in each layer of the pyramid.
* A value of lowerLeft specifies that row 1, column 1 of each layer is in the bottom left corner of the grid.
*/
object GridOrigin {
/**
* Creates a specific GridOrigin object from the String value, either "lowerLeft" or "upperLeft"
* @param value the name of the GridOrigin to construct
* @return a GridOrigin object or null if the value parameter is not a correct GridOrigin name or is null
*/
def fromString(value: String): GridOrigin =
if (value == null) null else
value.trim match {
case "lowerLeft" => LowerLeft
case "upperLeft" => UpperLeft
case _ => null
}
}
/**
* Specifies to begin numbering the tiles in a layer of a ImagePyramid from the lower left corner.
*/
case object LowerLeft extends GridOrigin {
/**
*
* @return "lowerLeft"
*/
override def toString = "lowerLeft"
}
/**
* Specifies to begin numbering the tiles in a layer of ImagePyramid from the upper left corner.
*/
case object UpperLeft extends GridOrigin {
/**
*
* @return "upperLeft"
*/
override def toString = "upperLeft"
}
/**
* Specifies the current state of a NetworkLink or Folder.
*/
trait ItemIconState
/**
* Specifies the current state of the NetworkLink or Folder.
* Possible values are open, closed, error, fetching0, fetching1, and fetching2.
* These values can be combined by inserting a space between two values (no comma).
*/
object ItemIconState {
/**
* Creates a specific ItemIconState object from the String value, either
* "open" "closed" "error" "fetching0" "fetching1" "fetching2"
* @param value the name of the ItemIconState to construct
* @return a ItemIconState object or null if the value parameter is not a correct ItemIconState name or is null
*/
def fromString(value: String): ItemIconState =
if (value == null) null else
value.trim match {
case "open" => Open
case "closed" => Closed
case "error" => Error
case "fetching0" => Fetching0
case "fetching1" => Fetching1
case "fetching2" => Fetching2
case _ => null
}
}
/**
* Specifies the open state of the NetworkLink or Folder.
*/
case object Open extends ItemIconState {
/**
*
* @return "open"
*/
override def toString = "open"
}
/**
* Specifies the closed state of the NetworkLink or Folder.
*/
case object Closed extends ItemIconState {
/**
*
* @return "closed"
*/
override def toString = "closed"
}
/**
* Specifies the error state of the NetworkLink or Folder.
*/
case object Error extends ItemIconState {
/**
*
* @return "error"
*/
override def toString = "error"
}
/**
* Specifies the Fetching0 state of the NetworkLink or Folder.
*/
case object Fetching0 extends ItemIconState {
/**
*
* @return "fetching0"
*/
override def toString = "fetching0"
}
/**
* Specifies the fetching1 state of the NetworkLink or Folder.
*/
case object Fetching1 extends ItemIconState {
/**
*
* @return "fetching1"
*/
override def toString = "fetching1"
}
/**
* Specifies the fetching2 state of the NetworkLink or Folder.
*/
case object Fetching2 extends ItemIconState {
/**
*
* @return "fetching2"
*/
override def toString = "fetching2"
}
/**
* Specifies how a Feature is displayed in the list view.
*/
trait ListItemType
/**
* Specifies how a Feature is displayed in the list view. Possible values are:
*
*
check (default) - The Feature's visibility is tied to its item's checkbox.
*
radioFolder - When specified for a Container, only one of the Container's items is visible at a time
*
checkOffOnly - When specified for a Container or Network Link, prevents all items from being made visible at once—that is, the user can turn everything in the Container or Network Link off but cannot turn everything on at the same time. This setting is useful for Containers or Network Links containing large amounts of data.
*
checkHideChildren - Use a normal checkbox for visibility but do not display the Container or Network Link's children in the list view.
*
* A checkbox allows the user to toggle visibility of the child objects in the viewer.
*/
object ListItemType {
/**
* Creates a specific ListItemType object from the String value, either
* "radioFolder" "check" "checkHideChildren" "checkOffOnly"
* @param value the name of the ListItemType to construct
* @return a ListItemType object or null if the value parameter is not a correct ListItemType name or is null
*/
def fromString(value: String): ListItemType =
if (value == null) null else
value.trim match {
case "radioFolder" => RadioFolder
case "check" => Check
case "checkHideChildren" => CheckHideChildren
case "checkOffOnly" => CheckOffOnly
case _ => null
}
}
/**
* Specifies the RadioFolder displayed in the list view.
* Only one of the Container's items shall be visible at a time.
*/
case object RadioFolder extends ListItemType {
/**
*
* @return "radioFolder"
*/
override def toString = "radioFolder"
}
/**
* Specifies the Check displayed in the list view.
* The Feature's visibility is tied to its item's checkbox.
*/
case object Check extends ListItemType {
/**
*
* @return "check"
*/
override def toString = "check"
}
/**
* Specifies the CheckHideChildren displayed in the list view.
* Use a normal checkbox for visibility but do not display the
* Container's children in the list view. A checkbox allows the user to toggle visibility
* of the child objects in the viewer.
*/
case object CheckHideChildren extends ListItemType {
/**
*
* @return "checkHideChildren"
*/
override def toString = "checkHideChildren"
}
/**
* Specifies the CheckOffOnly displayed in the list view.
* Prevents all items from being made visible at once—that is,
* the user can turn everything in the kml:AbstractContainerGroup off but
* cannot turn everything on at the same time. This setting is useful
* for Container's containing large amounts of data.
*/
case object CheckOffOnly extends ListItemType {
/**
*
* @return "checkOffOnly"
*/
override def toString = "checkOffOnly"
}
trait RefreshMode
/**
* Specifies a time-based refresh mode, which can be one of the following:
*
*
onChange - refresh when the file is loaded and whenever the Link parameters change (the default).
*
onInterval - refresh every n seconds (specified in ).
*
onExpire - refresh the file when the expiration time is reached.
* If a fetched file has a NetworkLinkControl, the time takes precedence over expiration times
* specified in HTTP headers. If no time is specified, the HTTP max-age header is used
* (if present). If max-age is not present, the Expires HTTP header is used (if present).
* (See Section RFC261b of the Hypertext Transfer Protocol - HTTP 1.1 for details on HTTP header fields.)
*
*/
object RefreshMode {
/**
* Creates a specific RefreshMode object from the String value, either
* "onChange" "onInterval" "onExpire"
* @param value the name of the RefreshMode to construct
* @return a RefreshMode object or null if the value parameter is not a correct RefreshMode name or is null
*/
def fromString(value: String): RefreshMode =
if (value == null) null else
value.trim match {
case "onChange" => OnChange
case "onInterval" => OnInterval
case "onExpire" => OnExpire
case _ => null
}
}
/**
* Specifies the OnChange time-based refresh mode
* Refresh when the resource is first loaded and whenever the Link parameters change.
*/
case object OnChange extends RefreshMode {
/**
*
* @return "onChange"
*/
override def toString = "onChange"
}
/**
* Specifies the OnInterval time-based refresh mode
* Refresh the resource every n seconds as specified in kml:refreshInterval.
*/
case object OnInterval extends RefreshMode {
/**
*
* @return "onInterval"
*/
override def toString = "onInterval"
}
/**
* Specifies the OnExpire time-based refresh mode
* Refresh the resource when the expiration time is reached.
*/
case object OnExpire extends RefreshMode {
/**
*
* @return "onExpire"
*/
override def toString = "onExpire"
}
/**
* Specifies how the link is refreshed when the "camera" changes.
*/
trait ViewRefreshMode
/**
* Specifies how the link is refreshed when the "camera" changes. Can be one of the following:
*
*
never (default) - Ignore changes in the view. Also ignore parameters, if any.
*
onStop - Refresh the file n seconds after movement stops, where n is specified in .
*
onRequest - Refresh the file only when the user explicitly requests it.
* (For example, in Google Earth, the user right-clicks and selects Refresh in the Context menu.)
*
onRegion - Refresh the file when the Region becomes active. See .
*
*/
object ViewRefreshMode {
/**
* Creates a specific ViewRefreshMode object from the String value, either
* "never" "onRequest" "onStop" "onRegion"
* @param value the name of the ViewRefreshMode to construct
* @return a ViewRefreshMode object or null if the value parameter is not a correct ViewRefreshMode name or is null
*/
def fromString(value: String): ViewRefreshMode =
if (value == null) null else
value.trim match {
case "never" => Never
case "onRequest" => OnRequest
case "onStop" => OnStop
case "onRegion" => OnRegion
case _ => null
}
}
/**
* Specifies the Never link refresh when the "camera" changes
* Ignore changes in the geographic view. Also ignore viewFormat parameters, if any.
*/
case object Never extends ViewRefreshMode {
override def toString = "never"
}
/**
* Specifies the OnRequest link refresh when the "camera" changes
* Refresh the resource only when the user explicitly requests it.
*/
case object OnRequest extends ViewRefreshMode {
/**
*
* @return "onRequest"
*/
override def toString = "onRequest"
}
/**
* Specifies the OnStop link refresh when the "camera" changes
* Refresh the resource n seconds after movement stops, where n is specified in viewRefreshTime.
*/
case object OnStop extends ViewRefreshMode {
/**
*
* @return "onStop"
*/
override def toString = "onStop"
}
/**
* Specifies the OnRegion link refresh when the "camera" changes
* Refresh the resource if a Region becomes active.
*/
case object OnRegion extends ViewRefreshMode {
/**
*
* @return "onRegion"
*/
override def toString = "onRegion"
}
trait Shape
/**
* The PhotoOverlay is projected onto the . The can be one of the following:
*
*
rectangle (default) - for an ordinary photo
*
cylinder - for panoramas, which can be either partial or full cylinders
*
sphere - for spherical panoramas
*
*/
object Shape {
/**
* Creates a specific Shape object from the String value, either
* "rectangle" "cylinder" "sphere"
* @param value the name of the Shape to construct
* @return a Shape object or null if the value parameter is not a correct Shape name or is null
*/
def fromString(value: String): Shape =
if (value == null) null else
value.trim match {
case "rectangle" => Rectangle
case "cylinder" => Cylinder
case "sphere" => Sphere
case _ => null
}
}
/**
* The PhotoOverlay is projected onto a Rectangle
* Used for an ordinary photo.
*/
case object Rectangle extends Shape {
/**
*
* @return "rectangle"
*/
override def toString = "rectangle"
}
/**
* The PhotoOverlay is projected onto a Cylinder
* Used for panoramas, which can be either partial or full cylinders.
*/
case object Cylinder extends Shape {
/**
*
* @return "cylinder"
*/
override def toString = "cylinder"
}
/**
* The PhotoOverlay is projected onto a Sphere
* Used for spherical panoramas.
*/
case object Sphere extends Shape {
/**
*
* @return "sphere"
*/
override def toString = "sphere"
}
/**
* The StyleState in StyleMap Pair
*/
trait StyleState
/**
* The StyleState in StyleMap Pair, can be normal or highlight
* @see StyleMap and Pair
*/
object StyleState {
/**
* Creates a specific StyleState object from the String value, either
* "normal" "highlight"
* @param value the name of the StyleState to construct
* @return a StyleState object or null if the value parameter is not a correct StyleState name or is null
*/
def fromString(value: String): StyleState =
if (value == null) null else
value.trim match {
case "normal" => Normal
case "highlight" => Highlight
case _ => null
}
}
/**
* The normal StyleState
*/
case object Normal extends StyleState {
/**
*
* @return "normal"
*/
override def toString = "normal"
}
/**
* The highlight StyleState
*/
case object Highlight extends StyleState {
/**
*
* @return "highlight"
*/
override def toString = "highlight"
}
trait Units
/**
*
* Field types used in specifying an image coordinate system, see Vec2 class
*
* @see class Vec2 and in ,
*/
object Units {
/**
* Creates a specific Units object from the String value, either
* "fraction" "pixels" "insetPixels"
* @param value the name of the Units to construct
* @return a Units object or null if the value parameter is not a correct Units name or is null
*/
def fromString(value: String): Units =
if (value == null) null else
value.trim match {
case "fraction" => Fraction
case "pixels" => Pixels
case "insetPixels" => InsetPixels
case _ => null
}
}
/**
* Value is a fraction of the icon.
*/
case object Fraction extends Units {
/**
*
* @return "fraction"
*/
override def toString = "fraction"
}
/**
* Value is a specific pixel size.
*/
case object Pixels extends Units {
/**
*
* @return "pixels"
*/
override def toString = "pixels"
}
/**
* Value is an offset in pixels from the upper right corner of the icon.
*/
case object InsetPixels extends Units {
/**
*
* @return "insetPixels"
*/
override def toString = "insetPixels"
}
/**
* Enumeration of all Feature types.
*/
object FeatureTypes extends Enumeration {
type FeatureTypes = Value
val Document, Folder, Placemark, NetworkLink, PhotoOverlay, ScreenOverlay, GroundOverlay, Tour = Value
}
/**
* Enumeration of all Container types.
*/
object ContainerTypes extends Enumeration {
type ContainerTypes = Value
val Document, Folder = Value
}
/**
* Enumeration of all Geometry types.
*/
object GeometryTypes extends Enumeration {
type GeometryTypes = Value
val Point, LineString, LinearRing, Polygon, MultiGeometry, Model, Track, MultiTrack = Value
}
/**
* Enumeration of all Style types.
*/
object StyleTypes extends Enumeration {
type StyleTypes = Value
val LineStyle, PolyStyle, IconStyle, LabelStyle, BalloonStyle, ListStyle = Value
}
/**
* Enumeration of all UpdateOption types.
*/
object UpdateOptionTypes extends Enumeration {
type UpdateOptionTypes = Value
val Create, Delete, Change = Value
}
/**
* Enumeration of all Kml Object types.
*/
object KmlObjectTypes extends Enumeration {
type KmlObjectTypes = Value
val Document, Folder, Placemark, NetworkLink, PhotoOverlay, ScreenOverlay, GroundOverlay, Tour,
Camera, LookAt, Data, SchemaData, MultiGeometry, Point, LineString, LinearRing,
Polygon, Model, Style, StyleMap, TimeStamp, TimeSpan, Region, LatLonAltBox, LatLonBox, Lod,
Icon, Link, Location, Orientation, Scale, ResourceMap, Alias, ViewVolume,
ImagePyramid, Pair, LineStyle, PolyStyle, IconStyle, LabelStyle, BalloonStyle,
ListStyle, ItemIcon = Value
}
/**
*
* Specifies an image coordinate system.
* The x and y values may each be specified in three different ways:
* as pixels (pixels), as fractions of the icon (fraction), or as inset pixels (insetPixels),
* which is an offset in pixels from the upper right corner of the icon.
* They may or may not be specified in a consistent manner -
* for example, x can be specified in pixels and y as a fraction.
*
* @see Object Units and in ,
*/
case class Vec2(x: Double, y: Double, xunits: Units, yunits: Units) {
def this() = this(0.0, 0.0, Fraction, Fraction)
}
// TODO could be more scala like
object HexColor {
def colorFromHex(hexVal: String): java.awt.Color = {
if ((hexVal == null) || (hexVal.length() != 8)) java.awt.Color.white
else {
val alpha = Integer.valueOf(hexVal.substring(0, 2), 16).intValue()
val r = Integer.valueOf(hexVal.substring(2, 4), 16).intValue()
val g = Integer.valueOf(hexVal.substring(4, 6), 16).intValue()
val b = Integer.valueOf(hexVal.substring(6, 8), 16).intValue()
new java.awt.Color(r, g, b, alpha)
}
}
def colorToHex(color: java.awt.Color): String = {
if (color == null) "ffffffff" else Integer.toHexString( 0x100000 | color.getRGB )
}
}
/**
* color class for a hex string
* @param hexString the hex string representing the color, default white ffffffff
*/
case class HexColor(hexString: String = "ffffffff") {
def this() = this("ffffffff")
def asColor = HexColor.colorFromHex(hexString)
}
/**
* This is an abstract base class and cannot be used directly in a KML file.
* It provides the id attribute, which allows unique identification of a KML element,
* and the targetId attribute, which is used to reference objects that have already been
* loaded into Google Earth. The id attribute must be assigned if the mechanism is to be used.
* The following elements can be used wherever this element is referenced:
* Document, Folder, Placemark, NetworkLink, PhotoOverlay, ScreenOverlay, GroundOverlay,
* Tour,Camera, LookAt, Data, SchemaData, MultiGeometry, Point, LineString, LinearRing,
* Polygon, Model, Style, StyleMap, TimeStamp, TimeSpan, Region, LatLonAltBox, Lod,Icon,
* Link, Location, Orientation, Scale, ResourceMap, Alias, ViewVolume,ImagePyramid, Pair,
* LineStyle, PolyStyle, IconStyle, LabelStyle, BalloonStyle,ListStyle, ItemIcon
*/
trait KmlObject {
val id: Option[String]
val targetId: Option[String]
val objectSimpleExtensionGroup: Seq[Any]
}
/**
* This is a base class and cannot be used directly in a KML file. FeaturePart is a field in
* the Feature trait. That trait is extended by: Document, Folder, Placemark, NetworkLink, PhotoOverlay, ScreenOverlay, GroundOverlay, Tour.
* In these classes FeaturePart is a component field.
* Note: do not confuse FeaturePart and a Feature that encapsulate it, that is the concrete classes that extend Feature trait.
* @see Feature
*
* @param name User-defined text displayed in the 3D viewer as the label for the object
* (for example, for a Placemark, Folder, or NetworkLink).
* @param visibility Specifies whether the feature is drawn in the 3D viewer when it is initially loaded. In order for a feature to be
* visible, the visibility of all its ancestors must also be set to true. Defaults to true.
* @param open Specifies whether a Document or Folder appears closed or open when first loaded into the Places panel.
* False=collapsed (the default), true=expanded. This element applies only to Document, Folder, and NetworkLink.
* @see ListStyle
* @param atomAuthor KML "2.2" supports new elements for including data about the author and related website in your KML file. This
* information is displayed in geo search results, both in Earth browsers such as Google Earth, and in other
* applications such as Google Maps. The ascription elements used in KML are as follows:
*
*
atom:author element - parent element for atom:name
*
atom:name element - the name of the author
*
atom:link element - contains the href attribute
*
href attribute - URL of the web page containing the KML/KMZ file
*
* These elements are defined in the Atom Syndication Format. The complete specification is found at
* http://atompub.org.
*
* The <atom:author> element is the parent element for <atom:name>, which specifies the author of the KML
* feature.
* @param atomLink Specifies the URL of the website containing this KML or KMZ file.
* Implementation note: Be sure to include the namespace for this element in any KML file that uses it:
* xmlns:atom="http://www.w3.org/2005/Atom" .
* @param address A string value representing an unstructured address written as a standard street, city, state address, and/or as a
* postal code. You can use the tag to specify the location of a point instead of using latitude and
* longitude coordinates. (However, if a is provided, it takes precedence over the .) To find out
* which locales are supported for this tag in Google Earth, go to the Google Maps Help.
* @param addressDetails A string value representing a telephone number. This element is used by Google Maps Mobile only. The industry
* standard for Java-enabled cellular phones is RFC2806. For more information,
* see http://www.ietf.org/rfc /rfc2806.txt.
* @param phoneNumber A string value representing a telephone number. This element is used by Google Maps Mobile only. The industry
* standard for Java-enabled cellular phones is RFC2806.
* For more information, see http://www.ietf.org/rfc /rfc2806.txt.
* @param extendedData Allows you to add custom data to a KML file. This data can be:
*
*
(1) data that references an external XML schema,
*
(2) untyped data/value pairs, or
*
(3) typed data. A given KML Feature can contain a combination of these types of custom data.
*
* @param description User-supplied content that appears in the description balloon.
* The supported content for the element changed from Google Earth 4.3 to 5.0. See the on-line
* documentation for extensive details.
* @param snippet A short description of the feature. In Google Earth, this description is displayed in the Places panel under the
* name of the feature. If a Snippet is not supplied, the first two lines of the are used. In Google
* Earth, if a Placemark contains both a description and a Snippet, the appears beneath the Placemark in
* the Places panel, and the appears in the Placemark's description balloon. This tag does not support
* HTML markup. has a maxLines attribute, an integer that specifies the maximum
* number of lines to display.
* @param abstractView Defines a viewpoint associated with any element derived from Feature.
* @see Camera and LookAt
* @param timePrimitive Associates this Feature with a period of time () or a point in time ().
* @param styleUrl URL of a