Options
All
  • Public
  • Public/Protected
  • All
Menu

A KmlLayer adds geographic markup to the map from a KML, KMZ or GeoRSS file that is hosted on a publicly accessible web server. A KmlFeatureData object is provided for each feature when clicked.

Access by calling const {KmlLayer} = await google.maps.importLibrary("maps"). See https://developers.google.com/maps/documentation/javascript/libraries.

Hierarchy

Index

Constructors

Methods

  • Adds the given listener function to the given event name. Returns an identifier for this listener that can be used with google.maps.event.removeListener.

    Parameters

    • eventName: string
    • handler: Function

    Returns MapsEventListener

  • bindTo(key: string, target: MVCObject, targetKey?: null | string, noNotify?: boolean): void
  • Binds a View to a Model.

    Parameters

    • key: string
    • target: MVCObject
    • Optional targetKey: null | string
    • Optional noNotify: boolean

    Returns void

  • get(key: string): any
  • Gets a value.

    Parameters

    • key: string

    Returns any

  • Get the default viewport for the layer being displayed.

    Returns null | LatLngBounds

  • getMap(): null | Map
  • Get the map on which the KML Layer is being rendered.

    Returns null | Map

  • Get the metadata associated with this layer, as specified in the layer markup.

    Returns null | KmlLayerMetadata

  • Get the status of the layer, set once the requested document has loaded.

    Returns KmlLayerStatus

  • getUrl(): string
  • Gets the URL of the KML file being displayed.

    Returns string

  • getZIndex(): number
  • Gets the z-index of the KML Layer.

    Returns number

  • notify(key: string): void
  • Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.

    Parameters

    • key: string

    Returns void

  • set(key: string, value: unknown): void
  • Sets a value.

    Parameters

    • key: string
    • value: unknown

    Returns void

  • setMap(map: null | Map): void
  • Renders the KML Layer on the specified map. If map is set to null, the layer is removed.

    Parameters

    • map: null | Map

    Returns void

  • setUrl(url: string): void
  • Sets the URL of the KML file to display.

    Parameters

    • url: string

    Returns void

  • setValues(values?: null | object): void
  • Sets a collection of key-value pairs.

    Parameters

    • Optional values: null | object

    Returns void

  • setZIndex(zIndex: number): void
  • Sets the z-index of the KML Layer.

    Parameters

    • zIndex: number

      The z-index to set.

    Returns void

  • unbind(key: string): void
  • Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.

    Parameters

    • key: string

    Returns void

  • unbindAll(): void

Generated using TypeDoc