kml

package module
v3.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: MIT Imports: 9 Imported by: 6

README

go-kml

PkgGoDev

Package kml provides convenience methods for creating and writing KML documents.

Key Features

  • Simple API for building arbitrarily complex KML documents.
  • Support for all KML elements, including Google Earth gx: extensions.
  • Compatibilty with the standard library encoding/xml package.
  • Pretty (neatly indented) and compact (minimum size) output formats.
  • Support for shared Style and StyleMap elements.
  • Simple mapping between functions and KML elements.
  • Convenience functions for using standard KML icons.
  • Convenience functions for spherical geometry.

Example

func ExampleKML() {
    k := kml.KML(
        kml.Placemark(
            kml.Name("Simple placemark"),
            kml.Description("Attached to the ground. Intelligently places itself at the height of the underlying terrain."),
            kml.Point(
                kml.Coordinates(kml.Coordinate{Lon: -122.0822035425683, Lat: 37.42228990140251}),
            ),
        ),
    )
    if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
        log.Fatal(err)
    }
}

Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>Simple placemark</name>
    <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description>
    <Point>
      <coordinates>-122.0822035425683,37.42228990140251</coordinates>
    </Point>
  </Placemark>
</kml>

There are more examples in the documentation corresponding to the examples in the KML tutorial.

Subpackages

  • icon Convenience functions for using standard KML icons.
  • sphere Convenience functions for spherical geometry.

License

MIT

Documentation

Overview

Package kml provides convenience methods for creating and writing KML documents.

See https://developers.google.com/kml/.

Goals

  • Convenient API for creating both simple and complex KML documents.
  • 1:1 mapping between functions and KML elements.

Non-goals

  • Protection against generating invalid documents.
  • Concealment of KML complexity.
  • Fine-grained control over generated XML.

Index

Examples

Constants

View Source
const GxNamespace = "http://www.google.com/kml/ext/2.2"

GxNamespace is the default namespace for Google Earth extensions.

View Source
const Namespace = "http://www.opengis.net/kml/2.2"

Namespace is the default namespace.

Variables

This section is empty.

Functions

func WriteKMZ added in v3.1.0

func WriteKMZ(w io.Writer, files map[string]any) error

WriteKMZ writes a KMZ file containing files to w. The values of the files map can be []bytes, strings, *KMLElements, *GxKMLElements, Elements, or io.Readers.

Example
doc := kml.KML(
	kml.Placemark(
		kml.Name("Zürich"),
		kml.Point(
			kml.Coordinates(
				kml.Coordinate{Lat: 47.374444, Lon: 8.541111},
			),
		),
	),
)

if err := kml.WriteKMZ(os.Stdout, map[string]any{
	"doc.kml": doc,
}); err != nil {
	panic(err)
}
Output:

Types

type AddressElement

type AddressElement struct {
	Value string
}

An AddressElement is an address element.

func Address

func Address(value string) *AddressElement

Address returns a new AddressElement.

func (*AddressElement) MarshalXML

func (e *AddressElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type AliasElement

type AliasElement struct {
	Children []Element
}

An AliasElement is an Alias element.

func Alias

func Alias(children ...Element) *AliasElement

Alias returns a new AliasElement.

func (*AliasElement) Append

func (e *AliasElement) Append(children ...Element) *AliasElement

Append appends children to e.

func (*AliasElement) MarshalXML

func (e *AliasElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type AltitudeElement

type AltitudeElement struct {
	Value float64
}

An AltitudeElement is an altitude element.

func Altitude

func Altitude(value float64) *AltitudeElement

Altitude returns a new AltitudeElement.

func (*AltitudeElement) MarshalXML

func (e *AltitudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type AltitudeModeElement

type AltitudeModeElement struct {
	Value AltitudeModeEnum
}

An AltitudeModeElement is an altitudeMode element.

func AltitudeMode

func AltitudeMode(value AltitudeModeEnum) *AltitudeModeElement

AltitudeMode returns a new AltitudeModeElement.

func (*AltitudeModeElement) MarshalXML

func (e *AltitudeModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type AltitudeModeEnum

type AltitudeModeEnum string

An AltitudeModeEnum is an altitudeModeEnumType.

const (
	AltitudeModeClampToGround    AltitudeModeEnum = "clampToGround"
	AltitudeModeRelativeToGround AltitudeModeEnum = "relativeToGround"
	AltitudeModeAbsolute         AltitudeModeEnum = "absolute"
)

AltitudeModeEnums.

func (AltitudeModeEnum) String

func (e AltitudeModeEnum) String() string

type BalloonStyleElement

type BalloonStyleElement struct {
	Children []Element
}

A BalloonStyleElement is a BalloonStyle element.

func BalloonStyle

func BalloonStyle(children ...Element) *BalloonStyleElement

BalloonStyle returns a new BalloonStyleElement.

func (*BalloonStyleElement) Append

func (e *BalloonStyleElement) Append(children ...Element) *BalloonStyleElement

Append appends children to e.

func (*BalloonStyleElement) MarshalXML

func (e *BalloonStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type BeginElement

type BeginElement struct {
	Value time.Time
}

A BeginElement is a begin element.

func Begin

func Begin(value time.Time) *BeginElement

Begin returns a new BeginElement.

func (*BeginElement) MarshalXML

func (e *BeginElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type BgColorElement

type BgColorElement struct {
	Value color.Color
}

A BgColorElement is a bgColor element.

func BgColor

func BgColor(value color.Color) *BgColorElement

BgColor returns a new BgColorElement.

func (*BgColorElement) MarshalXML

func (e *BgColorElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type BottomFOVElement

type BottomFOVElement struct {
	Value float64
}

A BottomFOVElement is a bottomFov element.

func BottomFOV

func BottomFOV(value float64) *BottomFOVElement

BottomFOV returns a new BottomFOVElement.

func (*BottomFOVElement) MarshalXML

func (e *BottomFOVElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type CameraElement

type CameraElement struct {
	Children []Element
}

A CameraElement is a Camera element.

func Camera

func Camera(children ...Element) *CameraElement

Camera returns a new CameraElement.

func (*CameraElement) Append

func (e *CameraElement) Append(children ...Element) *CameraElement

Append appends children to e.

func (*CameraElement) MarshalXML

func (e *CameraElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ChangeElement

type ChangeElement struct {
	Children []Element
}

A ChangeElement is a Change element.

func Change

func Change(children ...Element) *ChangeElement

Change returns a new ChangeElement.

func (*ChangeElement) Append

func (e *ChangeElement) Append(children ...Element) *ChangeElement

Append appends children to e.

func (*ChangeElement) MarshalXML

func (e *ChangeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ColorElement

type ColorElement struct {
	Value color.Color
}

A ColorElement is a color element.

func Color

func Color(value color.Color) *ColorElement

Color returns a new ColorElement.

func (*ColorElement) MarshalXML

func (e *ColorElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ColorModeElement

type ColorModeElement struct {
	Value ColorModeEnum
}

A ColorModeElement is a colorMode element.

func ColorMode

func ColorMode(value ColorModeEnum) *ColorModeElement

ColorMode returns a new ColorModeElement.

func (*ColorModeElement) MarshalXML

func (e *ColorModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ColorModeEnum

type ColorModeEnum string

A ColorModeEnum is a colorModeEnumType.

const (
	ColorModeNormal ColorModeEnum = "normal"
	ColorModeRandom ColorModeEnum = "random"
)

ColorModeEnums.

func (ColorModeEnum) String

func (e ColorModeEnum) String() string

type CookieElement

type CookieElement struct {
	Value string
}

A CookieElement is a cookie element.

func Cookie(value string) *CookieElement

Cookie returns a new CookieElement.

func (*CookieElement) MarshalXML

func (e *CookieElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type Coordinate

type Coordinate struct {
	Lon float64 // Longitude in degrees.
	Lat float64 // Latitude in degrees.
	Alt float64 // Altitude in meters.
}

A Coordinate is a single geographical coordinate.

type CoordinatesElement

type CoordinatesElement []Coordinate

CoordinatesElement is a coordinates element composed of Coordinates.

func Coordinates

func Coordinates(value ...Coordinate) CoordinatesElement

Coordinates returns a new CoordinatesElement.

func (CoordinatesElement) MarshalXML

func (e CoordinatesElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type CoordinatesFlatElement

type CoordinatesFlatElement struct {
	FlatCoords []float64
	Offset     int
	End        int
	Stride     int
	Dim        int
}

CoordinatesFlatElement is a coordinates element composed of flat coordinates.

func CoordinatesFlat

func CoordinatesFlat(flatCoords []float64, offset, end, stride, dim int) *CoordinatesFlatElement

CoordinatesFlat returns a new Coordinates element from flat coordinates.

func (*CoordinatesFlatElement) MarshalXML

func (e *CoordinatesFlatElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type CoordinatesSliceElement

type CoordinatesSliceElement [][]float64

CoordinatesSliceElement is a coordinates element composed of a slice of []float64s.

func CoordinatesSlice

func CoordinatesSlice(value ...[]float64) CoordinatesSliceElement

CoordinatesSlice returns a new CoordinatesArrayElement.

func (CoordinatesSliceElement) MarshalXML

func (e CoordinatesSliceElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type CreateElement

type CreateElement struct {
	Children []Element
}

A CreateElement is a Create element.

func Create

func Create(children ...Element) *CreateElement

Create returns a new CreateElement.

func (*CreateElement) Append

func (e *CreateElement) Append(children ...Element) *CreateElement

Append appends children to e.

func (*CreateElement) MarshalXML

func (e *CreateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DataElement

type DataElement struct {
	Name     string
	Children []Element
}

A DataElement is a Data element.

func Data

func Data(name string, children ...Element) *DataElement

Data returns a new DataElement.

func (*DataElement) Append

func (e *DataElement) Append(children ...Element) *DataElement

Append appends children to e.

func (*DataElement) MarshalXML

func (e *DataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DeleteElement

type DeleteElement struct {
	Children []Element
}

A DeleteElement is a Delete element.

func Delete

func Delete(children ...Element) *DeleteElement

Delete returns a new DeleteElement.

func (*DeleteElement) Append

func (e *DeleteElement) Append(children ...Element) *DeleteElement

Append appends children to e.

func (*DeleteElement) MarshalXML

func (e *DeleteElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DescriptionElement

type DescriptionElement struct {
	Value string
}

A DescriptionElement is a description element.

func Description

func Description(value string) *DescriptionElement

Description returns a new DescriptionElement.

Example
k := kml.KML(
	kml.Document(
		kml.Placemark(
			kml.Name("CDATA example"),
			kml.Description(`<h1>CDATA Tags are useful!</h1> <p><font color="red">Text is <i>more readable</i> and <b>easier to write</b> when you can avoid using entity references.</font></p>`),
			kml.Point(
				kml.Coordinates(kml.Coordinate{Lon: 102.595626, Lat: 14.996729}),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark>
      <name>CDATA example</name>
      <description>&lt;h1&gt;CDATA Tags are useful!&lt;/h1&gt; &lt;p&gt;&lt;font color=&#34;red&#34;&gt;Text is &lt;i&gt;more readable&lt;/i&gt; and &lt;b&gt;easier to write&lt;/b&gt; when you can avoid using entity references.&lt;/font&gt;&lt;/p&gt;</description>
      <Point>
        <coordinates>102.595626,14.996729</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

func (*DescriptionElement) MarshalXML

func (e *DescriptionElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DisplayModeElement

type DisplayModeElement struct {
	Value DisplayModeEnum
}

A DisplayModeElement is a displayMode element.

func DisplayMode

func DisplayMode(value DisplayModeEnum) *DisplayModeElement

DisplayMode returns a new DisplayModeElement.

func (*DisplayModeElement) MarshalXML

func (e *DisplayModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DisplayModeEnum

type DisplayModeEnum string

A DisplayModeEnum is a displayModeEnumType.

const (
	DisplayModeDefault DisplayModeEnum = "default"
	DisplayModeHide    DisplayModeEnum = "hide"
)

DisplayModeEnums.

func (DisplayModeEnum) String

func (e DisplayModeEnum) String() string

type DisplayNameElement

type DisplayNameElement struct {
	Value string
}

A DisplayNameElement is a displayName element.

func DisplayName

func DisplayName(value string) *DisplayNameElement

DisplayName returns a new DisplayNameElement.

func (*DisplayNameElement) MarshalXML

func (e *DisplayNameElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DocumentElement

type DocumentElement struct {
	Children []Element
}

A DocumentElement is a Document element.

func Document

func Document(children ...Element) *DocumentElement

Document returns a new DocumentElement.

func (*DocumentElement) Append

func (e *DocumentElement) Append(children ...Element) *DocumentElement

Append appends children to e.

func (*DocumentElement) MarshalXML

func (e *DocumentElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type DrawOrderElement

type DrawOrderElement struct {
	Value int
}

A DrawOrderElement is a drawOrder element.

func DrawOrder

func DrawOrder(value int) *DrawOrderElement

DrawOrder returns a new DrawOrderElement.

func (*DrawOrderElement) MarshalXML

func (e *DrawOrderElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type EastElement

type EastElement struct {
	Value float64
}

An EastElement is an east element.

func East

func East(value float64) *EastElement

East returns a new EastElement.

func (*EastElement) MarshalXML

func (e *EastElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type Element

type Element interface {
	xml.Marshaler
}

An Element is a KML element.

type EndElement

type EndElement struct {
	Value time.Time
}

An EndElement is an end element.

func End

func End(value time.Time) *EndElement

End returns a new EndElement.

func (*EndElement) MarshalXML

func (e *EndElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ExpiresElement

type ExpiresElement struct {
	Value time.Time
}

An ExpiresElement is an expires element.

func Expires

func Expires(value time.Time) *ExpiresElement

Expires returns a new ExpiresElement.

func (*ExpiresElement) MarshalXML

func (e *ExpiresElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ExtendedDataElement

type ExtendedDataElement struct {
	Children []Element
}

An ExtendedDataElement is an ExtendedData element.

func ExtendedData

func ExtendedData(children ...Element) *ExtendedDataElement

ExtendedData returns a new ExtendedDataElement.

func (*ExtendedDataElement) Append

func (e *ExtendedDataElement) Append(children ...Element) *ExtendedDataElement

Append appends children to e.

func (*ExtendedDataElement) MarshalXML

func (e *ExtendedDataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ExtrudeElement

type ExtrudeElement struct {
	Value bool
}

An ExtrudeElement is an extrude element.

func Extrude

func Extrude(value bool) *ExtrudeElement

Extrude returns a new ExtrudeElement.

func (*ExtrudeElement) MarshalXML

func (e *ExtrudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type FillElement

type FillElement struct {
	Value bool
}

A FillElement is a fill element.

func Fill

func Fill(value bool) *FillElement

Fill returns a new FillElement.

func (*FillElement) MarshalXML

func (e *FillElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type FlyToViewElement

type FlyToViewElement struct {
	Value bool
}

A FlyToViewElement is a flyToView element.

func FlyToView

func FlyToView(value bool) *FlyToViewElement

FlyToView returns a new FlyToViewElement.

func (*FlyToViewElement) MarshalXML

func (e *FlyToViewElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type FolderElement

type FolderElement struct {
	Children []Element
}

A FolderElement is a Folder element.

func Folder

func Folder(children ...Element) *FolderElement

Folder returns a new FolderElement.

func (*FolderElement) Append

func (e *FolderElement) Append(children ...Element) *FolderElement

Append appends children to e.

func (*FolderElement) MarshalXML

func (e *FolderElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GridOriginElement

type GridOriginElement struct {
	Value GridOriginEnum
}

A GridOriginElement is a gridOrigin element.

func GridOrigin

func GridOrigin(value GridOriginEnum) *GridOriginElement

GridOrigin returns a new GridOriginElement.

func (*GridOriginElement) MarshalXML

func (e *GridOriginElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GridOriginEnum

type GridOriginEnum string

A GridOriginEnum is a gridOriginEnumType.

const (
	GridOriginLowerLeft GridOriginEnum = "lowerLeft"
	GridOriginUpperLeft GridOriginEnum = "upperLeft"
)

GridOriginEnums.

func (GridOriginEnum) String

func (e GridOriginEnum) String() string

type GroundOverlayElement

type GroundOverlayElement struct {
	Children []Element
}

A GroundOverlayElement is a GroundOverlay element.

func GroundOverlay

func GroundOverlay(children ...Element) *GroundOverlayElement

GroundOverlay returns a new GroundOverlayElement.

Example
k := kml.KML(
	kml.Folder(
		kml.Name("Ground Overlays"),
		kml.Description("Examples of ground overlays"),
		kml.GroundOverlay(
			kml.Name("Large-scale overlay on terrain"),
			kml.Description("Overlay shows Mount Etna erupting on July 13th, 2001."),
			kml.Icon(
				kml.Href("https://developers.google.com/kml/documentation/images/etna.jpg"),
			),
			kml.LatLonBox(
				kml.North(37.91904192681665),
				kml.South(37.46543388598137),
				kml.East(15.35832653742206),
				kml.West(14.60128369746704),
				kml.Rotation(-0.1556640799496235),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Folder>
    <name>Ground Overlays</name>
    <description>Examples of ground overlays</description>
    <GroundOverlay>
      <name>Large-scale overlay on terrain</name>
      <description>Overlay shows Mount Etna erupting on July 13th, 2001.</description>
      <Icon>
        <href>https://developers.google.com/kml/documentation/images/etna.jpg</href>
      </Icon>
      <LatLonBox>
        <north>37.91904192681665</north>
        <south>37.46543388598137</south>
        <east>15.35832653742206</east>
        <west>14.60128369746704</west>
        <rotation>-0.1556640799496235</rotation>
      </LatLonBox>
    </GroundOverlay>
  </Folder>
</kml>

func (*GroundOverlayElement) Append

func (e *GroundOverlayElement) Append(children ...Element) *GroundOverlayElement

Append appends children to e.

func (*GroundOverlayElement) MarshalXML

func (e *GroundOverlayElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxAbstractTourPrimitiveElement

type GxAbstractTourPrimitiveElement struct {
	Children []Element
}

A GxAbstractTourPrimitiveElement is an AbstractTourPrimitive element.

func GxAbstractTourPrimitive

func GxAbstractTourPrimitive(children ...Element) *GxAbstractTourPrimitiveElement

GxAbstractTourPrimitive returns a new GxAbstractTourPrimitiveElement.

func (*GxAbstractTourPrimitiveElement) Append

Append appends children to e.

func (*GxAbstractTourPrimitiveElement) MarshalXML

func (e *GxAbstractTourPrimitiveElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxAltitudeModeElement

type GxAltitudeModeElement struct {
	Value GxAltitudeModeEnum
}

A GxAltitudeModeElement is an altitudeMode element.

func GxAltitudeMode

func GxAltitudeMode(value GxAltitudeModeEnum) *GxAltitudeModeElement

GxAltitudeMode returns a new GxAltitudeModeElement.

func (*GxAltitudeModeElement) MarshalXML

func (e *GxAltitudeModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxAltitudeModeEnum

type GxAltitudeModeEnum string

A GxAltitudeModeEnum is an altitudeModeEnumType.

const (
	GxAltitudeModeClampToGround      GxAltitudeModeEnum = "clampToGround"
	GxAltitudeModeRelativeToGround   GxAltitudeModeEnum = "relativeToGround"
	GxAltitudeModeAbsolute           GxAltitudeModeEnum = "absolute"
	GxAltitudeModeClampToSeaFloor    GxAltitudeModeEnum = "clampToSeaFloor"
	GxAltitudeModeRelativeToSeaFloor GxAltitudeModeEnum = "relativeToSeaFloor"
)

GxAltitudeModeEnums.

func (GxAltitudeModeEnum) String

func (e GxAltitudeModeEnum) String() string

type GxAltitudeOffsetElement

type GxAltitudeOffsetElement struct {
	Value float64
}

A GxAltitudeOffsetElement is an altitudeOffset element.

func GxAltitudeOffset

func GxAltitudeOffset(value float64) *GxAltitudeOffsetElement

GxAltitudeOffset returns a new GxAltitudeOffsetElement.

func (*GxAltitudeOffsetElement) MarshalXML

func (e *GxAltitudeOffsetElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxAnglesElement

type GxAnglesElement struct {
	Heading float64
	Tilt    float64
	Roll    float64
}

A GxAnglesElement is a gx:angles element.

func GxAngles

func GxAngles(heading, tilt, roll float64) *GxAnglesElement

GxAngles returns a new GxAnglesElement.

func (*GxAnglesElement) MarshalXML

func (e *GxAnglesElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxAnimatedUpdateElement

type GxAnimatedUpdateElement struct {
	Children []Element
}

A GxAnimatedUpdateElement is an AnimatedUpdate element.

func GxAnimatedUpdate

func GxAnimatedUpdate(children ...Element) *GxAnimatedUpdateElement

GxAnimatedUpdate returns a new GxAnimatedUpdateElement.

func (*GxAnimatedUpdateElement) Append

Append appends children to e.

func (*GxAnimatedUpdateElement) MarshalXML

func (e *GxAnimatedUpdateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxBalloonVisibilityElement

type GxBalloonVisibilityElement struct {
	Value bool
}

A GxBalloonVisibilityElement is a balloonVisibility element.

func GxBalloonVisibility

func GxBalloonVisibility(value bool) *GxBalloonVisibilityElement

GxBalloonVisibility returns a new GxBalloonVisibilityElement.

func (*GxBalloonVisibilityElement) MarshalXML

func (e *GxBalloonVisibilityElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxCoordElement

type GxCoordElement Coordinate

A GxCoordElement is a gx:coord element.

func GxCoord

func GxCoord(coordinate Coordinate) GxCoordElement

GxCoord returns a new GxCoordElement.

func (GxCoordElement) MarshalXML

func (e GxCoordElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxDelayedStartElement

type GxDelayedStartElement struct {
	Value time.Duration
}

A GxDelayedStartElement is a delayedStart element.

func GxDelayedStart

func GxDelayedStart(value time.Duration) *GxDelayedStartElement

GxDelayedStart returns a new GxDelayedStartElement.

func (*GxDelayedStartElement) MarshalXML

func (e *GxDelayedStartElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxDrawOrderElement

type GxDrawOrderElement struct {
	Value int
}

A GxDrawOrderElement is a drawOrder element.

func GxDrawOrder

func GxDrawOrder(value int) *GxDrawOrderElement

GxDrawOrder returns a new GxDrawOrderElement.

func (*GxDrawOrderElement) MarshalXML

func (e *GxDrawOrderElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxDurationElement

type GxDurationElement struct {
	Value time.Duration
}

A GxDurationElement is a duration element.

func GxDuration

func GxDuration(value time.Duration) *GxDurationElement

GxDuration returns a new GxDurationElement.

func (*GxDurationElement) MarshalXML

func (e *GxDurationElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxFlyToElement

type GxFlyToElement struct {
	Children []Element
}

A GxFlyToElement is a FlyTo element.

func GxFlyTo

func GxFlyTo(children ...Element) *GxFlyToElement

GxFlyTo returns a new GxFlyToElement.

func (*GxFlyToElement) Append

func (e *GxFlyToElement) Append(children ...Element) *GxFlyToElement

Append appends children to e.

func (*GxFlyToElement) MarshalXML

func (e *GxFlyToElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxFlyToModeElement

type GxFlyToModeElement struct {
	Value GxFlyToModeEnum
}

A GxFlyToModeElement is a flyToMode element.

func GxFlyToMode

func GxFlyToMode(value GxFlyToModeEnum) *GxFlyToModeElement

GxFlyToMode returns a new GxFlyToModeElement.

func (*GxFlyToModeElement) MarshalXML

func (e *GxFlyToModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxFlyToModeEnum

type GxFlyToModeEnum string

A GxFlyToModeEnum is a flyToModeEnumType.

const (
	GxFlyToModeBounce GxFlyToModeEnum = "bounce"
	GxFlyToModeSmooth GxFlyToModeEnum = "smooth"
)

GxFlyToModeEnums.

func (GxFlyToModeEnum) String

func (e GxFlyToModeEnum) String() string

type GxHElement

type GxHElement struct {
	Value int
}

A GxHElement is a h element.

func GxH

func GxH(value int) *GxHElement

GxH returns a new GxHElement.

func (*GxHElement) MarshalXML

func (e *GxHElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxHorizFOVElement

type GxHorizFOVElement struct {
	Value float64
}

A GxHorizFOVElement is a horizFov element.

func GxHorizFOV

func GxHorizFOV(value float64) *GxHorizFOVElement

GxHorizFOV returns a new GxHorizFOVElement.

func (*GxHorizFOVElement) MarshalXML

func (e *GxHorizFOVElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxInterpolateElement

type GxInterpolateElement struct {
	Value bool
}

A GxInterpolateElement is an interpolate element.

func GxInterpolate

func GxInterpolate(value bool) *GxInterpolateElement

GxInterpolate returns a new GxInterpolateElement.

func (*GxInterpolateElement) MarshalXML

func (e *GxInterpolateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxKMLElement

type GxKMLElement struct {
	Child Element
}

A GxKMLElement is a kml element with gx: extensions.

func GxKML

func GxKML(child Element) *GxKMLElement

GxKML returns a new GxKMLElement.

func (*GxKMLElement) MarshalXML

func (e *GxKMLElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*GxKMLElement) Write

func (e *GxKMLElement) Write(w io.Writer) error

Write writes e to w.

func (*GxKMLElement) WriteIndent

func (e *GxKMLElement) WriteIndent(w io.Writer, prefix, indent string) error

WriteIndent writes e to w with the given prefix and indent.

type GxLabelVisibilityElement

type GxLabelVisibilityElement struct {
	Value bool
}

A GxLabelVisibilityElement is a labelVisibility element.

func GxLabelVisibility

func GxLabelVisibility(value bool) *GxLabelVisibilityElement

GxLabelVisibility returns a new GxLabelVisibilityElement.

func (*GxLabelVisibilityElement) MarshalXML

func (e *GxLabelVisibilityElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxLatLonQuadElement

type GxLatLonQuadElement struct {
	Children []Element
}

A GxLatLonQuadElement is a LatLonQuad element.

func GxLatLonQuad

func GxLatLonQuad(children ...Element) *GxLatLonQuadElement

GxLatLonQuad returns a new GxLatLonQuadElement.

func (*GxLatLonQuadElement) Append

func (e *GxLatLonQuadElement) Append(children ...Element) *GxLatLonQuadElement

Append appends children to e.

func (*GxLatLonQuadElement) MarshalXML

func (e *GxLatLonQuadElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxMultiTrackElement

type GxMultiTrackElement struct {
	Children []Element
}

A GxMultiTrackElement is a MultiTrack element.

func GxMultiTrack

func GxMultiTrack(children ...Element) *GxMultiTrackElement

GxMultiTrack returns a new GxMultiTrackElement.

func (*GxMultiTrackElement) Append

func (e *GxMultiTrackElement) Append(children ...Element) *GxMultiTrackElement

Append appends children to e.

func (*GxMultiTrackElement) MarshalXML

func (e *GxMultiTrackElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxOptionElement

type GxOptionElement struct {
	Name    GxOptionName
	Enabled bool
}

A GxOptionElement is a gx:option element.

func GxOption

func GxOption(name GxOptionName, enabled bool) *GxOptionElement

GxOption returns a new gx:option element.

func (*GxOptionElement) MarshalXML

func (e *GxOptionElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxOptionName

type GxOptionName string

A GxOptionName is a gx:option name.

const (
	GxOptionNameHistoricalImagery GxOptionName = "historicalimagery"
	GxOptionNameStreetView        GxOptionName = "streetview"
	GxOptionNameSunlight          GxOptionName = "sunlight"
)

GxOptionNames.

func (GxOptionName) String

func (e GxOptionName) String() string

type GxOuterColorElement

type GxOuterColorElement struct {
	Value color.Color
}

A GxOuterColorElement is an outerColor element.

func GxOuterColor

func GxOuterColor(value color.Color) *GxOuterColorElement

GxOuterColor returns a new GxOuterColorElement.

func (*GxOuterColorElement) MarshalXML

func (e *GxOuterColorElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxOuterWidthElement

type GxOuterWidthElement struct {
	Value float64
}

A GxOuterWidthElement is an outerWidth element.

func GxOuterWidth

func GxOuterWidth(value float64) *GxOuterWidthElement

GxOuterWidth returns a new GxOuterWidthElement.

func (*GxOuterWidthElement) MarshalXML

func (e *GxOuterWidthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxPhysicalWidthElement

type GxPhysicalWidthElement struct {
	Value float64
}

A GxPhysicalWidthElement is a physicalWidth element.

func GxPhysicalWidth

func GxPhysicalWidth(value float64) *GxPhysicalWidthElement

GxPhysicalWidth returns a new GxPhysicalWidthElement.

func (*GxPhysicalWidthElement) MarshalXML

func (e *GxPhysicalWidthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxPlayModeElement

type GxPlayModeElement struct {
	Value GxPlayModeEnum
}

A GxPlayModeElement is a playMode element.

func GxPlayMode

func GxPlayMode(value GxPlayModeEnum) *GxPlayModeElement

GxPlayMode returns a new GxPlayModeElement.

func (*GxPlayModeElement) MarshalXML

func (e *GxPlayModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxPlayModeEnum

type GxPlayModeEnum string

A GxPlayModeEnum is a playModeEnumType.

const (
	GxPlayModePause GxPlayModeEnum = "pause"
)

GxPlayModeEnums.

func (GxPlayModeEnum) String

func (e GxPlayModeEnum) String() string

type GxPlaylistElement

type GxPlaylistElement struct {
	Children []Element
}

A GxPlaylistElement is a Playlist element.

func GxPlaylist

func GxPlaylist(children ...Element) *GxPlaylistElement

GxPlaylist returns a new GxPlaylistElement.

func (*GxPlaylistElement) Append

func (e *GxPlaylistElement) Append(children ...Element) *GxPlaylistElement

Append appends children to e.

func (*GxPlaylistElement) MarshalXML

func (e *GxPlaylistElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxRankElement

type GxRankElement struct {
	Value float64
}

A GxRankElement is a rank element.

func GxRank

func GxRank(value float64) *GxRankElement

GxRank returns a new GxRankElement.

func (*GxRankElement) MarshalXML

func (e *GxRankElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxSimpleArrayDataElement

type GxSimpleArrayDataElement struct {
	Children []Element
}

A GxSimpleArrayDataElement is a SimpleArrayData element.

func GxSimpleArrayData

func GxSimpleArrayData(children ...Element) *GxSimpleArrayDataElement

GxSimpleArrayData returns a new GxSimpleArrayDataElement.

func (*GxSimpleArrayDataElement) Append

Append appends children to e.

func (*GxSimpleArrayDataElement) MarshalXML

func (e *GxSimpleArrayDataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxSimpleArrayFieldElement

type GxSimpleArrayFieldElement struct {
	Name     string
	Type     string
	Children []Element
}

A GxSimpleArrayFieldElement is a gx:SimpleArrayField element.

func GxSimpleArrayField

func GxSimpleArrayField(name, _type string, children ...Element) *GxSimpleArrayFieldElement

GxSimpleArrayField returns a new GxSimpleArrayFieldElement.

func (*GxSimpleArrayFieldElement) MarshalXML

func (e *GxSimpleArrayFieldElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxSoundCueElement

type GxSoundCueElement struct {
	Children []Element
}

A GxSoundCueElement is a SoundCue element.

func GxSoundCue

func GxSoundCue(children ...Element) *GxSoundCueElement

GxSoundCue returns a new GxSoundCueElement.

func (*GxSoundCueElement) Append

func (e *GxSoundCueElement) Append(children ...Element) *GxSoundCueElement

Append appends children to e.

func (*GxSoundCueElement) MarshalXML

func (e *GxSoundCueElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxTimeSpanElement

type GxTimeSpanElement struct {
	Children []Element
}

A GxTimeSpanElement is a TimeSpan element.

func GxTimeSpan

func GxTimeSpan(children ...Element) *GxTimeSpanElement

GxTimeSpan returns a new GxTimeSpanElement.

func (*GxTimeSpanElement) Append

func (e *GxTimeSpanElement) Append(children ...Element) *GxTimeSpanElement

Append appends children to e.

func (*GxTimeSpanElement) MarshalXML

func (e *GxTimeSpanElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxTimeStampElement

type GxTimeStampElement struct {
	Children []Element
}

A GxTimeStampElement is a TimeStamp element.

func GxTimeStamp

func GxTimeStamp(children ...Element) *GxTimeStampElement

GxTimeStamp returns a new GxTimeStampElement.

func (*GxTimeStampElement) Append

func (e *GxTimeStampElement) Append(children ...Element) *GxTimeStampElement

Append appends children to e.

func (*GxTimeStampElement) MarshalXML

func (e *GxTimeStampElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxTourControlElement

type GxTourControlElement struct {
	Children []Element
}

A GxTourControlElement is a TourControl element.

func GxTourControl

func GxTourControl(children ...Element) *GxTourControlElement

GxTourControl returns a new GxTourControlElement.

func (*GxTourControlElement) Append

func (e *GxTourControlElement) Append(children ...Element) *GxTourControlElement

Append appends children to e.

func (*GxTourControlElement) MarshalXML

func (e *GxTourControlElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxTourElement

type GxTourElement struct {
	Children []Element
}

A GxTourElement is a Tour element.

func GxTour

func GxTour(children ...Element) *GxTourElement

GxTour returns a new GxTourElement.

func (*GxTourElement) Append

func (e *GxTourElement) Append(children ...Element) *GxTourElement

Append appends children to e.

func (*GxTourElement) MarshalXML

func (e *GxTourElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxTrackElement

type GxTrackElement struct {
	Children []Element
}

A GxTrackElement is a Track element.

func GxTrack

func GxTrack(children ...Element) *GxTrackElement

GxTrack returns a new GxTrackElement.

func (*GxTrackElement) Append

func (e *GxTrackElement) Append(children ...Element) *GxTrackElement

Append appends children to e.

func (*GxTrackElement) MarshalXML

func (e *GxTrackElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxViewerOptionsElement

type GxViewerOptionsElement struct {
	Children []Element
}

A GxViewerOptionsElement is a ViewerOptions element.

func GxViewerOptions

func GxViewerOptions(children ...Element) *GxViewerOptionsElement

GxViewerOptions returns a new GxViewerOptionsElement.

func (*GxViewerOptionsElement) Append

func (e *GxViewerOptionsElement) Append(children ...Element) *GxViewerOptionsElement

Append appends children to e.

func (*GxViewerOptionsElement) MarshalXML

func (e *GxViewerOptionsElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxWElement

type GxWElement struct {
	Value int
}

A GxWElement is a w element.

func GxW

func GxW(value int) *GxWElement

GxW returns a new GxWElement.

func (*GxWElement) MarshalXML

func (e *GxWElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxWaitElement

type GxWaitElement struct {
	Children []Element
}

A GxWaitElement is a Wait element.

func GxWait

func GxWait(children ...Element) *GxWaitElement

GxWait returns a new GxWaitElement.

func (*GxWaitElement) Append

func (e *GxWaitElement) Append(children ...Element) *GxWaitElement

Append appends children to e.

func (*GxWaitElement) MarshalXML

func (e *GxWaitElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxXElement

type GxXElement struct {
	Value int
}

A GxXElement is a x element.

func GxX

func GxX(value int) *GxXElement

GxX returns a new GxXElement.

func (*GxXElement) MarshalXML

func (e *GxXElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type GxYElement

type GxYElement struct {
	Value int
}

A GxYElement is a y element.

func GxY

func GxY(value int) *GxYElement

GxY returns a new GxYElement.

func (*GxYElement) MarshalXML

func (e *GxYElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type HeadingElement

type HeadingElement struct {
	Value float64
}

A HeadingElement is a heading element.

func Heading

func Heading(value float64) *HeadingElement

Heading returns a new HeadingElement.

func (*HeadingElement) MarshalXML

func (e *HeadingElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type HotSpotElement

type HotSpotElement struct {
	Value Vec2
}

A HotSpotElement is a hotSpot element.

func HotSpot

func HotSpot(value Vec2) *HotSpotElement

HotSpot returns a new HotSpotElement.

func (*HotSpotElement) MarshalXML

func (e *HotSpotElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type HrefElement

type HrefElement struct {
	Value string
}

A HrefElement is a href element.

func Href

func Href(value string) *HrefElement

Href returns a new HrefElement.

func (*HrefElement) MarshalXML

func (e *HrefElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type HttpQueryElement

type HttpQueryElement struct {
	Value string
}

A HttpQueryElement is a httpQuery element.

func HttpQuery

func HttpQuery(value string) *HttpQueryElement

HttpQuery returns a new HttpQueryElement.

func (*HttpQueryElement) MarshalXML

func (e *HttpQueryElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type IconElement

type IconElement struct {
	Children []Element
}

An IconElement is an Icon element.

func Icon

func Icon(children ...Element) *IconElement

Icon returns a new IconElement.

func (*IconElement) Append

func (e *IconElement) Append(children ...Element) *IconElement

Append appends children to e.

func (*IconElement) MarshalXML

func (e *IconElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type IconStyleElement

type IconStyleElement struct {
	Children []Element
}

An IconStyleElement is an IconStyle element.

func IconStyle

func IconStyle(children ...Element) *IconStyleElement

IconStyle returns a new IconStyleElement.

func (*IconStyleElement) Append

func (e *IconStyleElement) Append(children ...Element) *IconStyleElement

Append appends children to e.

func (*IconStyleElement) MarshalXML

func (e *IconStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ImagePyramidElement

type ImagePyramidElement struct {
	Children []Element
}

An ImagePyramidElement is an ImagePyramid element.

func ImagePyramid

func ImagePyramid(children ...Element) *ImagePyramidElement

ImagePyramid returns a new ImagePyramidElement.

func (*ImagePyramidElement) Append

func (e *ImagePyramidElement) Append(children ...Element) *ImagePyramidElement

Append appends children to e.

func (*ImagePyramidElement) MarshalXML

func (e *ImagePyramidElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type InnerBoundaryIsElement

type InnerBoundaryIsElement struct {
	Children []Element
}

An InnerBoundaryIsElement is an innerBoundaryIs element.

func InnerBoundaryIs

func InnerBoundaryIs(children ...Element) *InnerBoundaryIsElement

InnerBoundaryIs returns a new InnerBoundaryIsElement.

func (*InnerBoundaryIsElement) Append

func (e *InnerBoundaryIsElement) Append(children ...Element) *InnerBoundaryIsElement

Append appends children to e.

func (*InnerBoundaryIsElement) MarshalXML

func (e *InnerBoundaryIsElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ItemIconElement

type ItemIconElement struct {
	Children []Element
}

An ItemIconElement is an ItemIcon element.

func ItemIcon

func ItemIcon(children ...Element) *ItemIconElement

ItemIcon returns a new ItemIconElement.

func (*ItemIconElement) Append

func (e *ItemIconElement) Append(children ...Element) *ItemIconElement

Append appends children to e.

func (*ItemIconElement) MarshalXML

func (e *ItemIconElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ItemIconStateEnum

type ItemIconStateEnum string

An ItemIconStateEnum is an itemIconStateEnumType.

const (
	ItemIconStateOpen      ItemIconStateEnum = "open"
	ItemIconStateClosed    ItemIconStateEnum = "closed"
	ItemIconStateError     ItemIconStateEnum = "error"
	ItemIconStateFetching0 ItemIconStateEnum = "fetching0"
	ItemIconStateFetching1 ItemIconStateEnum = "fetching1"
	ItemIconStateFetching2 ItemIconStateEnum = "fetching2"
)

ItemIconStateEnums.

func (ItemIconStateEnum) String

func (e ItemIconStateEnum) String() string

type KMLElement

type KMLElement struct {
	Child Element
}

A KMLElement is a kml element.

func KML

func KML(child Element) *KMLElement

KML returns a new KMLElement.

func (*KMLElement) MarshalXML

func (e *KMLElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*KMLElement) Write

func (e *KMLElement) Write(w io.Writer) error

Write writes e to w.

func (*KMLElement) WriteIndent

func (e *KMLElement) WriteIndent(w io.Writer, prefix, indent string) error

WriteIndent writes e to w with the given prefix and indent.

type KeyElement

type KeyElement struct {
	Value StyleStateEnum
}

A KeyElement is a key element.

func Key

func Key(value StyleStateEnum) *KeyElement

Key returns a new KeyElement.

func (*KeyElement) MarshalXML

func (e *KeyElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LODElement

type LODElement struct {
	Children []Element
}

A LODElement is a Lod element.

func LOD

func LOD(children ...Element) *LODElement

LOD returns a new LODElement.

func (*LODElement) Append

func (e *LODElement) Append(children ...Element) *LODElement

Append appends children to e.

func (*LODElement) MarshalXML

func (e *LODElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LabelStyleElement

type LabelStyleElement struct {
	Children []Element
}

A LabelStyleElement is a LabelStyle element.

func LabelStyle

func LabelStyle(children ...Element) *LabelStyleElement

LabelStyle returns a new LabelStyleElement.

func (*LabelStyleElement) Append

func (e *LabelStyleElement) Append(children ...Element) *LabelStyleElement

Append appends children to e.

func (*LabelStyleElement) MarshalXML

func (e *LabelStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LatLonAltBoxElement

type LatLonAltBoxElement struct {
	Children []Element
}

A LatLonAltBoxElement is a LatLonAltBox element.

func LatLonAltBox

func LatLonAltBox(children ...Element) *LatLonAltBoxElement

LatLonAltBox returns a new LatLonAltBoxElement.

func (*LatLonAltBoxElement) Append

func (e *LatLonAltBoxElement) Append(children ...Element) *LatLonAltBoxElement

Append appends children to e.

func (*LatLonAltBoxElement) MarshalXML

func (e *LatLonAltBoxElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LatLonBoxElement

type LatLonBoxElement struct {
	Children []Element
}

A LatLonBoxElement is a LatLonBox element.

func LatLonBox

func LatLonBox(children ...Element) *LatLonBoxElement

LatLonBox returns a new LatLonBoxElement.

func (*LatLonBoxElement) Append

func (e *LatLonBoxElement) Append(children ...Element) *LatLonBoxElement

Append appends children to e.

func (*LatLonBoxElement) MarshalXML

func (e *LatLonBoxElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LatitudeElement

type LatitudeElement struct {
	Value float64
}

A LatitudeElement is a latitude element.

func Latitude

func Latitude(value float64) *LatitudeElement

Latitude returns a new LatitudeElement.

func (*LatitudeElement) MarshalXML

func (e *LatitudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LeftFOVElement

type LeftFOVElement struct {
	Value float64
}

A LeftFOVElement is a leftFov element.

func LeftFOV

func LeftFOV(value float64) *LeftFOVElement

LeftFOV returns a new LeftFOVElement.

func (*LeftFOVElement) MarshalXML

func (e *LeftFOVElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LineStringElement

type LineStringElement struct {
	Children []Element
}

A LineStringElement is a LineString element.

func LineString

func LineString(children ...Element) *LineStringElement

LineString returns a new LineStringElement.

Example
k := kml.KML(
	kml.Document(
		kml.Name("Paths"),
		kml.Description("Examples of paths. Note that the tessellate tag is by default set to 0. If you want to create tessellated lines, they must be authored (or edited) directly in KML."),
		kml.SharedStyle(
			"yellowLineGreenPoly",
			kml.LineStyle(
				kml.Color(color.RGBA{R: 255, G: 255, B: 0, A: 127}),
				kml.Width(4),
			),
			kml.PolyStyle(
				kml.Color(color.RGBA{R: 0, G: 255, B: 0, A: 127}),
			),
		),
		kml.Placemark(
			kml.Name("Absolute Extruded"),
			kml.Description("Transparent green wall with yellow outlines"),
			kml.StyleURL("#yellowLineGreenPoly"),
			kml.LineString(
				kml.Extrude(true),
				kml.Tessellate(true),
				kml.AltitudeMode(kml.AltitudeModeAbsolute),
				kml.Coordinates([]kml.Coordinate{
					{Lon: -112.2550785337791, Lat: 36.07954952145647, Alt: 2357},
					{Lon: -112.2549277039738, Lat: 36.08117083492122, Alt: 2357},
					{Lon: -112.2552505069063, Lat: 36.08260761307279, Alt: 2357},
					{Lon: -112.2564540158376, Lat: 36.08395660588506, Alt: 2357},
					{Lon: -112.2580238976449, Lat: 36.08511401044813, Alt: 2357},
					{Lon: -112.2595218489022, Lat: 36.08584355239394, Alt: 2357},
					{Lon: -112.2608216347552, Lat: 36.08612634548589, Alt: 2357},
					{Lon: -112.262073428656, Lat: 36.08626019085147, Alt: 2357},
					{Lon: -112.2633204928495, Lat: 36.08621519860091, Alt: 2357},
					{Lon: -112.2644963846444, Lat: 36.08627897945274, Alt: 2357},
					{Lon: -112.2656969554589, Lat: 36.08649599090644, Alt: 2357},
				}...),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Paths</name>
    <description>Examples of paths. Note that the tessellate tag is by default set to 0. If you want to create tessellated lines, they must be authored (or edited) directly in KML.</description>
    <Style id="yellowLineGreenPoly">
      <LineStyle>
        <color>7f00ffff</color>
        <width>4</width>
      </LineStyle>
      <PolyStyle>
        <color>7f00ff00</color>
      </PolyStyle>
    </Style>
    <Placemark>
      <name>Absolute Extruded</name>
      <description>Transparent green wall with yellow outlines</description>
      <styleUrl>#yellowLineGreenPoly</styleUrl>
      <LineString>
        <extrude>1</extrude>
        <tessellate>1</tessellate>
        <altitudeMode>absolute</altitudeMode>
        <coordinates>-112.2550785337791,36.07954952145647,2357 -112.2549277039738,36.08117083492122,2357 -112.2552505069063,36.08260761307279,2357 -112.2564540158376,36.08395660588506,2357 -112.2580238976449,36.08511401044813,2357 -112.2595218489022,36.08584355239394,2357 -112.2608216347552,36.08612634548589,2357 -112.262073428656,36.08626019085147,2357 -112.2633204928495,36.08621519860091,2357 -112.2644963846444,36.08627897945274,2357 -112.2656969554589,36.08649599090644,2357</coordinates>
      </LineString>
    </Placemark>
  </Document>
</kml>

func (*LineStringElement) Append

func (e *LineStringElement) Append(children ...Element) *LineStringElement

Append appends children to e.

func (*LineStringElement) MarshalXML

func (e *LineStringElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LineStyleElement

type LineStyleElement struct {
	Children []Element
}

A LineStyleElement is a LineStyle element.

func LineStyle

func LineStyle(children ...Element) *LineStyleElement

LineStyle returns a new LineStyleElement.

func (*LineStyleElement) Append

func (e *LineStyleElement) Append(children ...Element) *LineStyleElement

Append appends children to e.

func (*LineStyleElement) MarshalXML

func (e *LineStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LinearRingElement

type LinearRingElement struct {
	Children []Element
}

A LinearRingElement is a LinearRing element.

func LinearRing

func LinearRing(children ...Element) *LinearRingElement

LinearRing returns a new LinearRingElement.

func (*LinearRingElement) Append

func (e *LinearRingElement) Append(children ...Element) *LinearRingElement

Append appends children to e.

func (*LinearRingElement) MarshalXML

func (e *LinearRingElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LinkDescriptionElement

type LinkDescriptionElement struct {
	Value string
}

A LinkDescriptionElement is a linkDescription element.

func LinkDescription

func LinkDescription(value string) *LinkDescriptionElement

LinkDescription returns a new LinkDescriptionElement.

func (*LinkDescriptionElement) MarshalXML

func (e *LinkDescriptionElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LinkElement

type LinkElement struct {
	Children []Element
}

A LinkElement is a Link element.

func Link(children ...Element) *LinkElement

Link returns a new LinkElement.

func (*LinkElement) Append

func (e *LinkElement) Append(children ...Element) *LinkElement

Append appends children to e.

func (*LinkElement) MarshalXML

func (e *LinkElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LinkNameElement

type LinkNameElement struct {
	Value string
}

A LinkNameElement is a linkName element.

func LinkName

func LinkName(value string) *LinkNameElement

LinkName returns a new LinkNameElement.

func (*LinkNameElement) MarshalXML

func (e *LinkNameElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LinkSnippetElement

type LinkSnippetElement struct {
	MaxLines int
	Value    string
}

A LinkSnippetElement is a LinkSnippet element.

func LinkSnippet

func LinkSnippet(value string) *LinkSnippetElement

LinkSnippet returns a new LinkSnippetElement.

func (*LinkSnippetElement) MarshalXML

func (e *LinkSnippetElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*LinkSnippetElement) WithMaxLines

func (e *LinkSnippetElement) WithMaxLines(maxLines int) *LinkSnippetElement

WithMaxLines sets e's maxLines attribute.

type ListItemTypeElement

type ListItemTypeElement struct {
	Value ListItemTypeEnum
}

A ListItemTypeElement is a listItemType element.

func ListItemType

func ListItemType(value ListItemTypeEnum) *ListItemTypeElement

ListItemType returns a new ListItemTypeElement.

func (*ListItemTypeElement) MarshalXML

func (e *ListItemTypeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ListItemTypeEnum

type ListItemTypeEnum string

A ListItemTypeEnum is a listItemTypeEnumType.

const (
	ListItemTypeRadioFolder       ListItemTypeEnum = "radioFolder"
	ListItemTypeCheck             ListItemTypeEnum = "check"
	ListItemTypeCheckHideChildren ListItemTypeEnum = "checkHideChildren"
	ListItemTypeCheckOffOnly      ListItemTypeEnum = "checkOffOnly"
)

ListItemTypeEnums.

func (ListItemTypeEnum) String

func (e ListItemTypeEnum) String() string

type ListStyleElement

type ListStyleElement struct {
	Children []Element
}

A ListStyleElement is a ListStyle element.

func ListStyle

func ListStyle(children ...Element) *ListStyleElement

ListStyle returns a new ListStyleElement.

func (*ListStyleElement) Append

func (e *ListStyleElement) Append(children ...Element) *ListStyleElement

Append appends children to e.

func (*ListStyleElement) MarshalXML

func (e *ListStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LocationElement

type LocationElement struct {
	Children []Element
}

A LocationElement is a Location element.

func Location

func Location(children ...Element) *LocationElement

Location returns a new LocationElement.

func (*LocationElement) Append

func (e *LocationElement) Append(children ...Element) *LocationElement

Append appends children to e.

func (*LocationElement) MarshalXML

func (e *LocationElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LongitudeElement

type LongitudeElement struct {
	Value float64
}

A LongitudeElement is a longitude element.

func Longitude

func Longitude(value float64) *LongitudeElement

Longitude returns a new LongitudeElement.

func (*LongitudeElement) MarshalXML

func (e *LongitudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type LookAtElement

type LookAtElement struct {
	Children []Element
}

A LookAtElement is a LookAt element.

func LookAt

func LookAt(children ...Element) *LookAtElement

LookAt returns a new LookAtElement.

func (*LookAtElement) Append

func (e *LookAtElement) Append(children ...Element) *LookAtElement

Append appends children to e.

func (*LookAtElement) MarshalXML

func (e *LookAtElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxAltitudeElement

type MaxAltitudeElement struct {
	Value float64
}

A MaxAltitudeElement is a maxAltitude element.

func MaxAltitude

func MaxAltitude(value float64) *MaxAltitudeElement

MaxAltitude returns a new MaxAltitudeElement.

func (*MaxAltitudeElement) MarshalXML

func (e *MaxAltitudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxFadeExtentElement

type MaxFadeExtentElement struct {
	Value float64
}

A MaxFadeExtentElement is a maxFadeExtent element.

func MaxFadeExtent

func MaxFadeExtent(value float64) *MaxFadeExtentElement

MaxFadeExtent returns a new MaxFadeExtentElement.

func (*MaxFadeExtentElement) MarshalXML

func (e *MaxFadeExtentElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxHeightElement

type MaxHeightElement struct {
	Value int
}

A MaxHeightElement is a maxHeight element.

func MaxHeight

func MaxHeight(value int) *MaxHeightElement

MaxHeight returns a new MaxHeightElement.

func (*MaxHeightElement) MarshalXML

func (e *MaxHeightElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxLODPixelsElement

type MaxLODPixelsElement struct {
	Value float64
}

A MaxLODPixelsElement is a maxLodPixels element.

func MaxLODPixels

func MaxLODPixels(value float64) *MaxLODPixelsElement

MaxLODPixels returns a new MaxLODPixelsElement.

func (*MaxLODPixelsElement) MarshalXML

func (e *MaxLODPixelsElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxSessionLengthElement

type MaxSessionLengthElement struct {
	Value time.Duration
}

A MaxSessionLengthElement is a maxSessionLength element.

func MaxSessionLength

func MaxSessionLength(value time.Duration) *MaxSessionLengthElement

MaxSessionLength returns a new MaxSessionLengthElement.

func (*MaxSessionLengthElement) MarshalXML

func (e *MaxSessionLengthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MaxWidthElement

type MaxWidthElement struct {
	Value int
}

A MaxWidthElement is a maxWidth element.

func MaxWidth

func MaxWidth(value int) *MaxWidthElement

MaxWidth returns a new MaxWidthElement.

func (*MaxWidthElement) MarshalXML

func (e *MaxWidthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MessageElement

type MessageElement struct {
	Value string
}

A MessageElement is a message element.

func Message

func Message(value string) *MessageElement

Message returns a new MessageElement.

func (*MessageElement) MarshalXML

func (e *MessageElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MetadataElement

type MetadataElement struct {
	Children []Element
}

A MetadataElement is a Metadata element.

func Metadata

func Metadata(children ...Element) *MetadataElement

Metadata returns a new MetadataElement.

func (*MetadataElement) Append

func (e *MetadataElement) Append(children ...Element) *MetadataElement

Append appends children to e.

func (*MetadataElement) MarshalXML

func (e *MetadataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MinAltitudeElement

type MinAltitudeElement struct {
	Value float64
}

A MinAltitudeElement is a minAltitude element.

func MinAltitude

func MinAltitude(value float64) *MinAltitudeElement

MinAltitude returns a new MinAltitudeElement.

func (*MinAltitudeElement) MarshalXML

func (e *MinAltitudeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MinFadeExtentElement

type MinFadeExtentElement struct {
	Value float64
}

A MinFadeExtentElement is a minFadeExtent element.

func MinFadeExtent

func MinFadeExtent(value float64) *MinFadeExtentElement

MinFadeExtent returns a new MinFadeExtentElement.

func (*MinFadeExtentElement) MarshalXML

func (e *MinFadeExtentElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MinLODPixelsElement

type MinLODPixelsElement struct {
	Value float64
}

A MinLODPixelsElement is a minLodPixels element.

func MinLODPixels

func MinLODPixels(value float64) *MinLODPixelsElement

MinLODPixels returns a new MinLODPixelsElement.

func (*MinLODPixelsElement) MarshalXML

func (e *MinLODPixelsElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MinRefreshPeriodElement

type MinRefreshPeriodElement struct {
	Value time.Duration
}

A MinRefreshPeriodElement is a minRefreshPeriod element.

func MinRefreshPeriod

func MinRefreshPeriod(value time.Duration) *MinRefreshPeriodElement

MinRefreshPeriod returns a new MinRefreshPeriodElement.

func (*MinRefreshPeriodElement) MarshalXML

func (e *MinRefreshPeriodElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ModelElement

type ModelElement struct {
	Children []Element
}

A ModelElement is a Model element.

func Model

func Model(children ...Element) *ModelElement

Model returns a new ModelElement.

func (*ModelElement) Append

func (e *ModelElement) Append(children ...Element) *ModelElement

Append appends children to e.

func (*ModelElement) MarshalXML

func (e *ModelElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ModelScaleElement

type ModelScaleElement struct {
	Children []Element
}

A ModelScaleElement is a Scale element.

func ModelScale

func ModelScale(children ...Element) *ModelScaleElement

ModelScale returns a new ModelScaleElement.

func (*ModelScaleElement) Append

func (e *ModelScaleElement) Append(children ...Element) *ModelScaleElement

Append appends children to e.

func (*ModelScaleElement) MarshalXML

func (e *ModelScaleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type MultiGeometryElement

type MultiGeometryElement struct {
	Children []Element
}

A MultiGeometryElement is a MultiGeometry element.

func MultiGeometry

func MultiGeometry(children ...Element) *MultiGeometryElement

MultiGeometry returns a new MultiGeometryElement.

func (*MultiGeometryElement) Append

func (e *MultiGeometryElement) Append(children ...Element) *MultiGeometryElement

Append appends children to e.

func (*MultiGeometryElement) MarshalXML

func (e *MultiGeometryElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type NameElement

type NameElement struct {
	Value string
}

A NameElement is a name element.

func Name

func Name(value string) *NameElement

Name returns a new NameElement.

func (*NameElement) MarshalXML

func (e *NameElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type NearElement

type NearElement struct {
	Value float64
}

A NearElement is a near element.

func Near

func Near(value float64) *NearElement

Near returns a new NearElement.

func (*NearElement) MarshalXML

func (e *NearElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type NetworkLinkControlElement

type NetworkLinkControlElement struct {
	Children []Element
}

A NetworkLinkControlElement is a NetworkLinkControl element.

func NetworkLinkControl

func NetworkLinkControl(children ...Element) *NetworkLinkControlElement

NetworkLinkControl returns a new NetworkLinkControlElement.

func (*NetworkLinkControlElement) Append

Append appends children to e.

func (*NetworkLinkControlElement) MarshalXML

func (e *NetworkLinkControlElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type NetworkLinkElement

type NetworkLinkElement struct {
	Children []Element
}

A NetworkLinkElement is a NetworkLink element.

func NetworkLink(children ...Element) *NetworkLinkElement

NetworkLink returns a new NetworkLinkElement.

func (*NetworkLinkElement) Append

func (e *NetworkLinkElement) Append(children ...Element) *NetworkLinkElement

Append appends children to e.

func (*NetworkLinkElement) MarshalXML

func (e *NetworkLinkElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type NorthElement

type NorthElement struct {
	Value float64
}

A NorthElement is a north element.

func North

func North(value float64) *NorthElement

North returns a new NorthElement.

func (*NorthElement) MarshalXML

func (e *NorthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type OpenElement

type OpenElement struct {
	Value bool
}

An OpenElement is an open element.

func Open

func Open(value bool) *OpenElement

Open returns a new OpenElement.

func (*OpenElement) MarshalXML

func (e *OpenElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type OrientationElement

type OrientationElement struct {
	Children []Element
}

An OrientationElement is an Orientation element.

func Orientation

func Orientation(children ...Element) *OrientationElement

Orientation returns a new OrientationElement.

func (*OrientationElement) Append

func (e *OrientationElement) Append(children ...Element) *OrientationElement

Append appends children to e.

func (*OrientationElement) MarshalXML

func (e *OrientationElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type OuterBoundaryIsElement

type OuterBoundaryIsElement struct {
	Children []Element
}

An OuterBoundaryIsElement is an outerBoundaryIs element.

func OuterBoundaryIs

func OuterBoundaryIs(children ...Element) *OuterBoundaryIsElement

OuterBoundaryIs returns a new OuterBoundaryIsElement.

func (*OuterBoundaryIsElement) Append

func (e *OuterBoundaryIsElement) Append(children ...Element) *OuterBoundaryIsElement

Append appends children to e.

func (*OuterBoundaryIsElement) MarshalXML

func (e *OuterBoundaryIsElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type OutlineElement

type OutlineElement struct {
	Value bool
}

An OutlineElement is an outline element.

func Outline

func Outline(value bool) *OutlineElement

Outline returns a new OutlineElement.

func (*OutlineElement) MarshalXML

func (e *OutlineElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type OverlayXYElement

type OverlayXYElement struct {
	Value Vec2
}

An OverlayXYElement is an overlayXY element.

func OverlayXY

func OverlayXY(value Vec2) *OverlayXYElement

OverlayXY returns a new OverlayXYElement.

func (*OverlayXYElement) MarshalXML

func (e *OverlayXYElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PairElement

type PairElement struct {
	Children []Element
}

A PairElement is a Pair element.

func Pair

func Pair(children ...Element) *PairElement

Pair returns a new PairElement.

func (*PairElement) Append

func (e *PairElement) Append(children ...Element) *PairElement

Append appends children to e.

func (*PairElement) MarshalXML

func (e *PairElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PhoneNumberElement

type PhoneNumberElement struct {
	Value string
}

A PhoneNumberElement is a phoneNumber element.

func PhoneNumber

func PhoneNumber(value string) *PhoneNumberElement

PhoneNumber returns a new PhoneNumberElement.

func (*PhoneNumberElement) MarshalXML

func (e *PhoneNumberElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PhotoOverlayElement

type PhotoOverlayElement struct {
	Children []Element
}

A PhotoOverlayElement is a PhotoOverlay element.

func PhotoOverlay

func PhotoOverlay(children ...Element) *PhotoOverlayElement

PhotoOverlay returns a new PhotoOverlayElement.

func (*PhotoOverlayElement) Append

func (e *PhotoOverlayElement) Append(children ...Element) *PhotoOverlayElement

Append appends children to e.

func (*PhotoOverlayElement) MarshalXML

func (e *PhotoOverlayElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PlacemarkElement

type PlacemarkElement struct {
	Children []Element
}

A PlacemarkElement is a Placemark element.

func Placemark

func Placemark(children ...Element) *PlacemarkElement

Placemark returns a new PlacemarkElement.

Example
k := kml.KML(
	kml.Placemark(
		kml.Name("Simple placemark"),
		kml.Description("Attached to the ground. Intelligently places itself at the height of the underlying terrain."),
		kml.Point(
			kml.Coordinates(kml.Coordinate{Lon: -122.0822035425683, Lat: 37.42228990140251}),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>Simple placemark</name>
    <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description>
    <Point>
      <coordinates>-122.0822035425683,37.42228990140251</coordinates>
    </Point>
  </Placemark>
</kml>

func (*PlacemarkElement) Append

func (e *PlacemarkElement) Append(children ...Element) *PlacemarkElement

Append appends children to e.

func (*PlacemarkElement) MarshalXML

func (e *PlacemarkElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PointElement

type PointElement struct {
	Children []Element
}

A PointElement is a Point element.

func Point

func Point(children ...Element) *PointElement

Point returns a new PointElement.

func (*PointElement) Append

func (e *PointElement) Append(children ...Element) *PointElement

Append appends children to e.

func (*PointElement) MarshalXML

func (e *PointElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PolyStyleElement

type PolyStyleElement struct {
	Children []Element
}

A PolyStyleElement is a PolyStyle element.

func PolyStyle

func PolyStyle(children ...Element) *PolyStyleElement

PolyStyle returns a new PolyStyleElement.

func (*PolyStyleElement) Append

func (e *PolyStyleElement) Append(children ...Element) *PolyStyleElement

Append appends children to e.

func (*PolyStyleElement) MarshalXML

func (e *PolyStyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type PolygonElement

type PolygonElement struct {
	Children []Element
}

A PolygonElement is a Polygon element.

func Polygon

func Polygon(children ...Element) *PolygonElement

Polygon returns a new PolygonElement.

Example
k := kml.KML(
	kml.Placemark(
		kml.Name("The Pentagon"),
		kml.Polygon(
			kml.Extrude(true),
			kml.AltitudeMode(kml.AltitudeModeRelativeToGround),
			kml.OuterBoundaryIs(
				kml.LinearRing(
					kml.Coordinates([]kml.Coordinate{
						{Lon: -77.05788457660967, Lat: 38.87253259892824, Alt: 100},
						{Lon: -77.05465973756702, Lat: 38.87291016281703, Alt: 100},
						{Lon: -77.0531553685479, Lat: 38.87053267794386, Alt: 100},
						{Lon: -77.05552622493516, Lat: 38.868757801256, Alt: 100},
						{Lon: -77.05844056290393, Lat: 38.86996206506943, Alt: 100},
						{Lon: -77.05788457660967, Lat: 38.87253259892824, Alt: 100},
					}...),
				),
			),
			kml.InnerBoundaryIs(
				kml.LinearRing(
					kml.Coordinates([]kml.Coordinate{
						{Lon: -77.05668055019126, Lat: 38.87154239798456, Alt: 100},
						{Lon: -77.05542625960818, Lat: 38.87167890344077, Alt: 100},
						{Lon: -77.05485125901023, Lat: 38.87076535397792, Alt: 100},
						{Lon: -77.05577677433152, Lat: 38.87008686581446, Alt: 100},
						{Lon: -77.05691162017543, Lat: 38.87054446963351, Alt: 100},
						{Lon: -77.05668055019126, Lat: 38.87154239798456, Alt: 100},
					}...),
				),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>The Pentagon</name>
    <Polygon>
      <extrude>1</extrude>
      <altitudeMode>relativeToGround</altitudeMode>
      <outerBoundaryIs>
        <LinearRing>
          <coordinates>-77.05788457660967,38.87253259892824,100 -77.05465973756702,38.87291016281703,100 -77.0531553685479,38.87053267794386,100 -77.05552622493516,38.868757801256,100 -77.05844056290393,38.86996206506943,100 -77.05788457660967,38.87253259892824,100</coordinates>
        </LinearRing>
      </outerBoundaryIs>
      <innerBoundaryIs>
        <LinearRing>
          <coordinates>-77.05668055019126,38.87154239798456,100 -77.05542625960818,38.87167890344077,100 -77.05485125901023,38.87076535397792,100 -77.05577677433152,38.87008686581446,100 -77.05691162017543,38.87054446963351,100 -77.05668055019126,38.87154239798456,100</coordinates>
        </LinearRing>
      </innerBoundaryIs>
    </Polygon>
  </Placemark>
</kml>

func (*PolygonElement) Append

func (e *PolygonElement) Append(children ...Element) *PolygonElement

Append appends children to e.

func (*PolygonElement) MarshalXML

func (e *PolygonElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RangeElement

type RangeElement struct {
	Value float64
}

A RangeElement is a range element.

func Range

func Range(value float64) *RangeElement

Range returns a new RangeElement.

func (*RangeElement) MarshalXML

func (e *RangeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RefreshIntervalElement

type RefreshIntervalElement struct {
	Value time.Duration
}

A RefreshIntervalElement is a refreshInterval element.

func RefreshInterval

func RefreshInterval(value time.Duration) *RefreshIntervalElement

RefreshInterval returns a new RefreshIntervalElement.

func (*RefreshIntervalElement) MarshalXML

func (e *RefreshIntervalElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RefreshModeElement

type RefreshModeElement struct {
	Value RefreshModeEnum
}

A RefreshModeElement is a refreshMode element.

func RefreshMode

func RefreshMode(value RefreshModeEnum) *RefreshModeElement

RefreshMode returns a new RefreshModeElement.

func (*RefreshModeElement) MarshalXML

func (e *RefreshModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RefreshModeEnum

type RefreshModeEnum string

A RefreshModeEnum is a refreshModeEnumType.

const (
	RefreshModeOnChange   RefreshModeEnum = "onChange"
	RefreshModeOnInterval RefreshModeEnum = "onInterval"
	RefreshModeOnExpire   RefreshModeEnum = "onExpire"
)

RefreshModeEnums.

func (RefreshModeEnum) String

func (e RefreshModeEnum) String() string

type RefreshVisibilityElement

type RefreshVisibilityElement struct {
	Value bool
}

A RefreshVisibilityElement is a refreshVisibility element.

func RefreshVisibility

func RefreshVisibility(value bool) *RefreshVisibilityElement

RefreshVisibility returns a new RefreshVisibilityElement.

func (*RefreshVisibilityElement) MarshalXML

func (e *RefreshVisibilityElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RegionElement

type RegionElement struct {
	Children []Element
}

A RegionElement is a Region element.

func Region

func Region(children ...Element) *RegionElement

Region returns a new RegionElement.

func (*RegionElement) Append

func (e *RegionElement) Append(children ...Element) *RegionElement

Append appends children to e.

func (*RegionElement) MarshalXML

func (e *RegionElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ResourceMapElement

type ResourceMapElement struct {
	Children []Element
}

A ResourceMapElement is a ResourceMap element.

func ResourceMap

func ResourceMap(children ...Element) *ResourceMapElement

ResourceMap returns a new ResourceMapElement.

func (*ResourceMapElement) Append

func (e *ResourceMapElement) Append(children ...Element) *ResourceMapElement

Append appends children to e.

func (*ResourceMapElement) MarshalXML

func (e *ResourceMapElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RightFOVElement

type RightFOVElement struct {
	Value float64
}

A RightFOVElement is a rightFov element.

func RightFOV

func RightFOV(value float64) *RightFOVElement

RightFOV returns a new RightFOVElement.

func (*RightFOVElement) MarshalXML

func (e *RightFOVElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RollElement

type RollElement struct {
	Value float64
}

A RollElement is a roll element.

func Roll

func Roll(value float64) *RollElement

Roll returns a new RollElement.

func (*RollElement) MarshalXML

func (e *RollElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RotationElement

type RotationElement struct {
	Value float64
}

A RotationElement is a rotation element.

func Rotation

func Rotation(value float64) *RotationElement

Rotation returns a new RotationElement.

func (*RotationElement) MarshalXML

func (e *RotationElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type RotationXYElement

type RotationXYElement struct {
	Value Vec2
}

A RotationXYElement is a rotationXY element.

func RotationXY

func RotationXY(value Vec2) *RotationXYElement

RotationXY returns a new RotationXYElement.

func (*RotationXYElement) MarshalXML

func (e *RotationXYElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ScaleElement

type ScaleElement struct {
	Value float64
}

A ScaleElement is a scale element.

func Scale

func Scale(value float64) *ScaleElement

Scale returns a new ScaleElement.

func (*ScaleElement) MarshalXML

func (e *ScaleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SchemaDataElement

type SchemaDataElement struct {
	SchemaURL string
	Children  []Element
}

A SchemaDataElement is a SchemaData element.

func SchemaData

func SchemaData(schemaURL string, children ...Element) *SchemaDataElement

SchemaData returns a new SchemaDataElement.

func (*SchemaDataElement) Append

func (e *SchemaDataElement) Append(children ...Element) *SchemaDataElement

Append appends children to e.

func (*SchemaDataElement) MarshalXML

func (e *SchemaDataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SchemaElement

type SchemaElement struct {
	ID       string
	Name     string
	Children []Element
}

A SchemaElement is a Schema element.

func NamedSchema

func NamedSchema(id, name string, children ...Element) *SchemaElement

NamedSchema returns a new SchemaElement with the given name.

func Schema

func Schema(id string, children ...Element) *SchemaElement

Schema returns a new SchemaElement.

func (*SchemaElement) Append

func (e *SchemaElement) Append(children ...Element) *SchemaElement

Append appends children to e.

func (*SchemaElement) MarshalXML

func (e *SchemaElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*SchemaElement) URL

func (e *SchemaElement) URL() string

URL return e's URL.

func (*SchemaElement) WithName

func (e *SchemaElement) WithName(name string) *SchemaElement

WithName sets e's name.

type ScreenOverlayElement

type ScreenOverlayElement struct {
	Children []Element
}

A ScreenOverlayElement is a ScreenOverlay element.

func ScreenOverlay

func ScreenOverlay(children ...Element) *ScreenOverlayElement

ScreenOverlay returns a new ScreenOverlayElement.

Example
k := kml.KML(
	kml.ScreenOverlay(
		kml.Name("Absolute Positioning: Top left"),
		kml.Icon(
			kml.Href("http://developers.google.com/kml/documentation/images/top_left.jpg"),
		),
		kml.OverlayXY(kml.Vec2{X: 0, Y: 1, XUnits: kml.UnitsFraction, YUnits: kml.UnitsFraction}),
		kml.ScreenXY(kml.Vec2{X: 0, Y: 1, XUnits: kml.UnitsFraction, YUnits: kml.UnitsFraction}),
		kml.RotationXY(kml.Vec2{X: 0, Y: 0, XUnits: kml.UnitsFraction, YUnits: kml.UnitsFraction}),
		kml.Size(kml.Vec2{X: 0, Y: 0, XUnits: kml.UnitsFraction, YUnits: kml.UnitsFraction}),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <ScreenOverlay>
    <name>Absolute Positioning: Top left</name>
    <Icon>
      <href>http://developers.google.com/kml/documentation/images/top_left.jpg</href>
    </Icon>
    <overlayXY x="0" y="1" xunits="fraction" yunits="fraction"></overlayXY>
    <screenXY x="0" y="1" xunits="fraction" yunits="fraction"></screenXY>
    <rotationXY x="0" y="0" xunits="fraction" yunits="fraction"></rotationXY>
    <size x="0" y="0" xunits="fraction" yunits="fraction"></size>
  </ScreenOverlay>
</kml>

func (*ScreenOverlayElement) Append

func (e *ScreenOverlayElement) Append(children ...Element) *ScreenOverlayElement

Append appends children to e.

func (*ScreenOverlayElement) MarshalXML

func (e *ScreenOverlayElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ScreenXYElement

type ScreenXYElement struct {
	Value Vec2
}

A ScreenXYElement is a screenXY element.

func ScreenXY

func ScreenXY(value Vec2) *ScreenXYElement

ScreenXY returns a new ScreenXYElement.

func (*ScreenXYElement) MarshalXML

func (e *ScreenXYElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ShapeElement

type ShapeElement struct {
	Value ShapeEnum
}

A ShapeElement is a shape element.

func Shape

func Shape(value ShapeEnum) *ShapeElement

Shape returns a new ShapeElement.

func (*ShapeElement) MarshalXML

func (e *ShapeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ShapeEnum

type ShapeEnum string

A ShapeEnum is a shapeEnumType.

const (
	ShapeRectangle ShapeEnum = "rectangle"
	ShapeCylinder  ShapeEnum = "cylinder"
	ShapeSphere    ShapeEnum = "sphere"
)

ShapeEnums.

func (ShapeEnum) String

func (e ShapeEnum) String() string

type SimpleDataElement

type SimpleDataElement struct {
	Name  string
	Value string
}

A SimpleDataElement is a SimpleData element.

func SimpleData

func SimpleData(name, value string) *SimpleDataElement

SimpleData returns a new SimpleDataElement.

func (*SimpleDataElement) MarshalXML

func (e *SimpleDataElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SimpleFieldElement

type SimpleFieldElement struct {
	Name     string
	Type     string
	Children []Element
}

A SimpleFieldElement is a SimpleField element.

func SimpleField

func SimpleField(name, _type string, children ...Element) *SimpleFieldElement

SimpleField returns a new SimpleFieldElement.

func (*SimpleFieldElement) Append

func (e *SimpleFieldElement) Append(children ...Element) *SimpleFieldElement

Append appends children to e.

func (*SimpleFieldElement) MarshalXML

func (e *SimpleFieldElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SizeElement

type SizeElement struct {
	Value Vec2
}

A SizeElement is a size element.

func Size

func Size(value Vec2) *SizeElement

Size returns a new SizeElement.

func (*SizeElement) MarshalXML

func (e *SizeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SnippetElement

type SnippetElement struct {
	MaxLines int
	Value    string
}

A SnippetElement is a snippet element.

func Snippet

func Snippet(value string) *SnippetElement

Snippet returns a new SnippetElement.

func (*SnippetElement) MarshalXML

func (e *SnippetElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*SnippetElement) WithMaxLines

func (e *SnippetElement) WithMaxLines(maxLines int) *SnippetElement

WithMaxLines sets e's maxLines attribute.

type SourceHrefElement

type SourceHrefElement struct {
	Value string
}

A SourceHrefElement is a sourceHref element.

func SourceHref

func SourceHref(value string) *SourceHrefElement

SourceHref returns a new SourceHrefElement.

func (*SourceHrefElement) MarshalXML

func (e *SourceHrefElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type SouthElement

type SouthElement struct {
	Value float64
}

A SouthElement is a south element.

func South

func South(value float64) *SouthElement

South returns a new SouthElement.

func (*SouthElement) MarshalXML

func (e *SouthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type StateElement

type StateElement struct {
	Value ItemIconStateEnum
}

A StateElement is a state element.

func State

func State(value ItemIconStateEnum) *StateElement

State returns a new StateElement.

func (*StateElement) MarshalXML

func (e *StateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type StyleElement

type StyleElement struct {
	ID       string
	Children []Element
}

A StyleElement is a Style element.

func SharedStyle

func SharedStyle(id string, children ...Element) *StyleElement

SharedStyle returns a new StyleElement with the given id.

func Style

func Style(children ...Element) *StyleElement

Style returns a new StyleElement.

Example
k := kml.KML(
	kml.Document(
		kml.SharedStyle(
			"transBluePoly",
			kml.LineStyle(
				kml.Width(1.5),
			),
			kml.PolyStyle(
				kml.Color(color.RGBA{R: 0, G: 0, B: 255, A: 125}),
			),
		),
		kml.Placemark(
			kml.Name("Building 41"),
			kml.StyleURL("#transBluePoly"),
			kml.Polygon(
				kml.Extrude(true),
				kml.AltitudeMode(kml.AltitudeModeRelativeToGround),
				kml.OuterBoundaryIs(
					kml.LinearRing(
						kml.Coordinates([]kml.Coordinate{
							{Lon: -122.0857412771483, Lat: 37.42227033155257, Alt: 17},
							{Lon: -122.0858169768481, Lat: 37.42231408832346, Alt: 17},
							{Lon: -122.085852582875, Lat: 37.42230337469744, Alt: 17},
							{Lon: -122.0858799945639, Lat: 37.42225686138789, Alt: 17},
							{Lon: -122.0858860101409, Lat: 37.4222311076138, Alt: 17},
							{Lon: -122.0858069157288, Lat: 37.42220250173855, Alt: 17},
							{Lon: -122.0858379542653, Lat: 37.42214027058678, Alt: 17},
							{Lon: -122.0856732640519, Lat: 37.42208690214408, Alt: 17},
							{Lon: -122.0856022926407, Lat: 37.42214885429042, Alt: 17},
							{Lon: -122.0855902778436, Lat: 37.422128290487, Alt: 17},
							{Lon: -122.0855841672237, Lat: 37.42208171967246, Alt: 17},
							{Lon: -122.0854852065741, Lat: 37.42210455874995, Alt: 17},
							{Lon: -122.0855067264352, Lat: 37.42214267949824, Alt: 17},
							{Lon: -122.0854430712915, Lat: 37.42212783846172, Alt: 17},
							{Lon: -122.0850990714904, Lat: 37.42251282407603, Alt: 17},
							{Lon: -122.0856769818632, Lat: 37.42281815323651, Alt: 17},
							{Lon: -122.0860162273783, Lat: 37.42244918858722, Alt: 17},
							{Lon: -122.0857260327004, Lat: 37.42229239604253, Alt: 17},
							{Lon: -122.0857412771483, Lat: 37.42227033155257, Alt: 17},
						}...),
					),
				),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Style id="transBluePoly">
      <LineStyle>
        <width>1.5</width>
      </LineStyle>
      <PolyStyle>
        <color>7dff0000</color>
      </PolyStyle>
    </Style>
    <Placemark>
      <name>Building 41</name>
      <styleUrl>#transBluePoly</styleUrl>
      <Polygon>
        <extrude>1</extrude>
        <altitudeMode>relativeToGround</altitudeMode>
        <outerBoundaryIs>
          <LinearRing>
            <coordinates>-122.0857412771483,37.42227033155257,17 -122.0858169768481,37.42231408832346,17 -122.085852582875,37.42230337469744,17 -122.0858799945639,37.42225686138789,17 -122.0858860101409,37.4222311076138,17 -122.0858069157288,37.42220250173855,17 -122.0858379542653,37.42214027058678,17 -122.0856732640519,37.42208690214408,17 -122.0856022926407,37.42214885429042,17 -122.0855902778436,37.422128290487,17 -122.0855841672237,37.42208171967246,17 -122.0854852065741,37.42210455874995,17 -122.0855067264352,37.42214267949824,17 -122.0854430712915,37.42212783846172,17 -122.0850990714904,37.42251282407603,17 -122.0856769818632,37.42281815323651,17 -122.0860162273783,37.42244918858722,17 -122.0857260327004,37.42229239604253,17 -122.0857412771483,37.42227033155257,17</coordinates>
          </LinearRing>
        </outerBoundaryIs>
      </Polygon>
    </Placemark>
  </Document>
</kml>

func (*StyleElement) Append

func (e *StyleElement) Append(children ...Element) *StyleElement

Append appends children to e.

func (*StyleElement) MarshalXML

func (e *StyleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*StyleElement) URL

func (e *StyleElement) URL() string

URL return e's URL.

func (*StyleElement) WithID

func (e *StyleElement) WithID(id string) *StyleElement

WithID sets e's ID.

type StyleMapElement

type StyleMapElement struct {
	ID       string
	Children []Element
}

A StyleMapElement is a StyleMap element.

func SharedStyleMap

func SharedStyleMap(id string, children ...Element) *StyleMapElement

SharedStyleMap returns a new StyleMapElement with the given id.

Example
k := kml.KML(
	kml.Document(
		kml.Name("Highlighted Icon"),
		kml.Description("Place your mouse over the icon to see it display the new icon"),
		kml.SharedStyle(
			"highlightPlacemark",
			kml.IconStyle(
				kml.Icon(
					kml.Href("http://maps.google.com/mapfiles/kml/paddle/red-stars.png"),
				),
			),
		),
		kml.SharedStyle(
			"normalPlacemark",
			kml.IconStyle(
				kml.Icon(
					kml.Href("http://maps.google.com/mapfiles/kml/paddle/wht-blank.png"),
				),
			),
		),
		kml.SharedStyleMap(
			"exampleStyleMap",
			kml.Pair(
				kml.Key(kml.StyleStateNormal),
				kml.StyleURL("#normalPlacemark"),
			),
			kml.Pair(
				kml.Key(kml.StyleStateHighlight),
				kml.StyleURL("#highlightPlacemark"),
			),
		),
		kml.Placemark(
			kml.Name("Roll over this icon"),
			kml.StyleURL("#exampleStyleMap"),
			kml.Point(
				kml.Coordinates(kml.Coordinate{Lon: -122.0856545755255, Lat: 37.42243077405461}),
			),
		),
	),
)
if err := k.WriteIndent(os.Stdout, "", "  "); err != nil {
	log.Fatal(err)
}
Output:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Highlighted Icon</name>
    <description>Place your mouse over the icon to see it display the new icon</description>
    <Style id="highlightPlacemark">
      <IconStyle>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/paddle/red-stars.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <Style id="normalPlacemark">
      <IconStyle>
        <Icon>
          <href>http://maps.google.com/mapfiles/kml/paddle/wht-blank.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <StyleMap id="exampleStyleMap">
      <Pair>
        <key>normal</key>
        <styleUrl>#normalPlacemark</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#highlightPlacemark</styleUrl>
      </Pair>
    </StyleMap>
    <Placemark>
      <name>Roll over this icon</name>
      <styleUrl>#exampleStyleMap</styleUrl>
      <Point>
        <coordinates>-122.0856545755255,37.42243077405461</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

func StyleMap

func StyleMap(children ...Element) *StyleMapElement

StyleMap returns a new StyleMapElement.

func (*StyleMapElement) Append

func (e *StyleMapElement) Append(children ...Element) *StyleMapElement

Append appends children to e.

func (*StyleMapElement) MarshalXML

func (e *StyleMapElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

func (*StyleMapElement) URL

func (e *StyleMapElement) URL() string

URL return e's URL.

func (*StyleMapElement) WithID

func (e *StyleMapElement) WithID(id string) *StyleMapElement

WithID sets e's ID.

type StyleStateEnum

type StyleStateEnum string

A StyleStateEnum is a styleStateEnumType.

const (
	StyleStateNormal    StyleStateEnum = "normal"
	StyleStateHighlight StyleStateEnum = "highlight"
)

StyleStateEnums.

func (StyleStateEnum) String

func (e StyleStateEnum) String() string

type StyleURLElement

type StyleURLElement struct {
	Value string
}

A StyleURLElement is a styleUrl element.

func StyleURL

func StyleURL(value string) *StyleURLElement

StyleURL returns a new StyleURLElement.

func (*StyleURLElement) MarshalXML

func (e *StyleURLElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TargetHrefElement

type TargetHrefElement struct {
	Value string
}

A TargetHrefElement is a targetHref element.

func TargetHref

func TargetHref(value string) *TargetHrefElement

TargetHref returns a new TargetHrefElement.

func (*TargetHrefElement) MarshalXML

func (e *TargetHrefElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TessellateElement

type TessellateElement struct {
	Value bool
}

A TessellateElement is a tessellate element.

func Tessellate

func Tessellate(value bool) *TessellateElement

Tessellate returns a new TessellateElement.

func (*TessellateElement) MarshalXML

func (e *TessellateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TextColorElement

type TextColorElement struct {
	Value color.Color
}

A TextColorElement is a textColor element.

func TextColor

func TextColor(value color.Color) *TextColorElement

TextColor returns a new TextColorElement.

func (*TextColorElement) MarshalXML

func (e *TextColorElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TextElement

type TextElement struct {
	Value string
}

A TextElement is a text element.

func Text

func Text(value string) *TextElement

Text returns a new TextElement.

func (*TextElement) MarshalXML

func (e *TextElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TileSizeElement

type TileSizeElement struct {
	Value int
}

A TileSizeElement is a tileSize element.

func TileSize

func TileSize(value int) *TileSizeElement

TileSize returns a new TileSizeElement.

func (*TileSizeElement) MarshalXML

func (e *TileSizeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TiltElement

type TiltElement struct {
	Value float64
}

A TiltElement is a tilt element.

func Tilt

func Tilt(value float64) *TiltElement

Tilt returns a new TiltElement.

func (*TiltElement) MarshalXML

func (e *TiltElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TimeSpanElement

type TimeSpanElement struct {
	Children []Element
}

A TimeSpanElement is a TimeSpan element.

func TimeSpan

func TimeSpan(children ...Element) *TimeSpanElement

TimeSpan returns a new TimeSpanElement.

func (*TimeSpanElement) Append

func (e *TimeSpanElement) Append(children ...Element) *TimeSpanElement

Append appends children to e.

func (*TimeSpanElement) MarshalXML

func (e *TimeSpanElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TimeStampElement

type TimeStampElement struct {
	Children []Element
}

A TimeStampElement is a TimeStamp element.

func TimeStamp

func TimeStamp(children ...Element) *TimeStampElement

TimeStamp returns a new TimeStampElement.

func (*TimeStampElement) Append

func (e *TimeStampElement) Append(children ...Element) *TimeStampElement

Append appends children to e.

func (*TimeStampElement) MarshalXML

func (e *TimeStampElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TopFOVElement

type TopFOVElement struct {
	Value float64
}

A TopFOVElement is a topFov element.

func TopFOV

func TopFOV(value float64) *TopFOVElement

TopFOV returns a new TopFOVElement.

func (*TopFOVElement) MarshalXML

func (e *TopFOVElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type TopLevelElement

type TopLevelElement interface {
	Element
	Write(w io.Writer) error
	WriteIndent(w io.Writer, prefix, indent string) error
}

A TopLevelElement is a top level KML element.

type URLElement

type URLElement struct {
	Children []Element
}

A URLElement is a Url element.

func URL

func URL(children ...Element) *URLElement

URL returns a new URLElement.

func (*URLElement) Append

func (e *URLElement) Append(children ...Element) *URLElement

Append appends children to e.

func (*URLElement) MarshalXML

func (e *URLElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type UnitsEnum

type UnitsEnum string

A UnitsEnum is a unitsEnumType.

const (
	UnitsFraction    UnitsEnum = "fraction"
	UnitsPixels      UnitsEnum = "pixels"
	UnitsInsetPixels UnitsEnum = "insetPixels"
)

UnitsEnums.

func (UnitsEnum) String

func (e UnitsEnum) String() string

type UpdateElement

type UpdateElement struct {
	Children []Element
}

A UpdateElement is a Update element.

func Update

func Update(children ...Element) *UpdateElement

Update returns a new UpdateElement.

func (*UpdateElement) Append

func (e *UpdateElement) Append(children ...Element) *UpdateElement

Append appends children to e.

func (*UpdateElement) MarshalXML

func (e *UpdateElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ValueElement

type ValueElement struct {
	Value any
}

A ValueElement is a value element.

func Value

func Value(value any) *ValueElement

Value returns a new ValueElement.

func (*ValueElement) MarshalXML

func (e *ValueElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type Vec2

type Vec2 struct {
	X      float64
	Y      float64
	XUnits UnitsEnum
	YUnits UnitsEnum
}

A Vec2 is a vec2.

type ViewBoundScaleElement

type ViewBoundScaleElement struct {
	Value float64
}

A ViewBoundScaleElement is a viewBoundScale element.

func ViewBoundScale

func ViewBoundScale(value float64) *ViewBoundScaleElement

ViewBoundScale returns a new ViewBoundScaleElement.

func (*ViewBoundScaleElement) MarshalXML

func (e *ViewBoundScaleElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ViewFormatElement

type ViewFormatElement struct {
	Value string
}

A ViewFormatElement is a viewFormat element.

func ViewFormat

func ViewFormat(value string) *ViewFormatElement

ViewFormat returns a new ViewFormatElement.

func (*ViewFormatElement) MarshalXML

func (e *ViewFormatElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ViewRefreshModeElement

type ViewRefreshModeElement struct {
	Value ViewRefreshModeEnum
}

A ViewRefreshModeElement is a viewRefreshMode element.

func ViewRefreshMode

func ViewRefreshMode(value ViewRefreshModeEnum) *ViewRefreshModeElement

ViewRefreshMode returns a new ViewRefreshModeElement.

func (*ViewRefreshModeElement) MarshalXML

func (e *ViewRefreshModeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ViewRefreshModeEnum

type ViewRefreshModeEnum string

A ViewRefreshModeEnum is a viewRefreshModeEnumType.

const (
	ViewRefreshModeNever     ViewRefreshModeEnum = "never"
	ViewRefreshModeOnRequest ViewRefreshModeEnum = "onRequest"
	ViewRefreshModeOnStop    ViewRefreshModeEnum = "onStop"
	ViewRefreshModeOnRegion  ViewRefreshModeEnum = "onRegion"
)

ViewRefreshModeEnums.

func (ViewRefreshModeEnum) String

func (e ViewRefreshModeEnum) String() string

type ViewRefreshTimeElement

type ViewRefreshTimeElement struct {
	Value time.Duration
}

A ViewRefreshTimeElement is a viewRefreshTime element.

func ViewRefreshTime

func ViewRefreshTime(value time.Duration) *ViewRefreshTimeElement

ViewRefreshTime returns a new ViewRefreshTimeElement.

func (*ViewRefreshTimeElement) MarshalXML

func (e *ViewRefreshTimeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ViewVolumeElement

type ViewVolumeElement struct {
	Children []Element
}

A ViewVolumeElement is a ViewVolume element.

func ViewVolume

func ViewVolume(children ...Element) *ViewVolumeElement

ViewVolume returns a new ViewVolumeElement.

func (*ViewVolumeElement) Append

func (e *ViewVolumeElement) Append(children ...Element) *ViewVolumeElement

Append appends children to e.

func (*ViewVolumeElement) MarshalXML

func (e *ViewVolumeElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type VisibilityElement

type VisibilityElement struct {
	Value bool
}

A VisibilityElement is a visibility element.

func Visibility

func Visibility(value bool) *VisibilityElement

Visibility returns a new VisibilityElement.

func (*VisibilityElement) MarshalXML

func (e *VisibilityElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type WestElement

type WestElement struct {
	Value float64
}

A WestElement is a west element.

func West

func West(value float64) *WestElement

West returns a new WestElement.

func (*WestElement) MarshalXML

func (e *WestElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type WhenElement

type WhenElement struct {
	Value time.Time
}

A WhenElement is a when element.

func When

func When(value time.Time) *WhenElement

When returns a new WhenElement.

func (*WhenElement) MarshalXML

func (e *WhenElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type WidthElement

type WidthElement struct {
	Value float64
}

A WidthElement is a width element.

func Width

func Width(value float64) *WidthElement

Width returns a new WidthElement.

func (*WidthElement) MarshalXML

func (e *WidthElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type XElement

type XElement struct {
	Value float64
}

A XElement is a x element.

func X

func X(value float64) *XElement

X returns a new XElement.

func (*XElement) MarshalXML

func (e *XElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type YElement

type YElement struct {
	Value float64
}

A YElement is a y element.

func Y

func Y(value float64) *YElement

Y returns a new YElement.

func (*YElement) MarshalXML

func (e *YElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

type ZElement

type ZElement struct {
	Value float64
}

A ZElement is a z element.

func Z

func Z(value float64) *ZElement

Z returns a new ZElement.

func (*ZElement) MarshalXML

func (e *ZElement) MarshalXML(encoder *xml.Encoder, _ xml.StartElement) error

MarshalXML implements encoding/xml.Marshaler.MarshalXML.

Directories

Path Synopsis
examples
hike-and-fly-route-kml
hike-and-fly-route prints a KML file of the route of popular races.
hike-and-fly-route prints a KML file of the route of popular races.
Package icon provides helper functions for standard Google Earth icons.
Package icon provides helper functions for standard Google Earth icons.
internal
Package sphere contains convenience methods for generating coordinates on a sphere.
Package sphere contains convenience methods for generating coordinates on a sphere.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL