Classdesc

Linestring geometry.

Param: coordinates

Coordinates.

Param: opt_layout

Layout.

Api

stable

Hierarchy

Constructors

Methods

  • Append the passed coordinate to the coordinates of the linestring.

    Parameters

    Returns void

    Api

    stable

  • Increases the revision counter and dispatches a 'change' event.

    Returns void

    Api

  • Make a complete copy of the geometry.

    Returns LineString

    Clone.

    Api

    stable

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    Returns void

    Function

    Api

  • Iterate over each segment, calling the provided callback. If the callback returns a truthy value the function returns that value immediately. Otherwise the function returns false.

    Type Parameters

    • T

    • S

    Parameters

    • callback: (() => T)

      Function called for each segment.

        • (): T
        • Returns T

    • Optional opt_this: S

      The object to be used as the value of 'this' within callback.

    Returns boolean | T

    Value.

    Api

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

    Api

    stable

  • Return the coordinate at the provided fraction along the linestring. The fraction is a number between 0 and 1, where 0 is the start of the linestring and 1 is the end.

    Parameters

    • fraction: number

      Fraction.

    • Optional opt_dest: Coordinate

      Optional coordinate whose values will be modified. If not provided, a new coordinate will be returned.

    Returns Coordinate

    Coordinate of the interpolated point.

    Api

  • Returns the coordinate at m using linear interpolation, or null if no such coordinate exists.

    opt_extrapolate controls extrapolation beyond the range of Ms in the MultiLineString. If opt_extrapolate is true then Ms less than the first M will return the first coordinate and Ms greater than the last M will return the last coordinate.

    Parameters

    • m: number

      M.

    • Optional opt_extrapolate: boolean

      Extrapolate. Default is false.

    Returns Coordinate

    Coordinate.

    Api

    stable

  • Return the coordinates of the linestring.

    Returns Coordinate[]

    Coordinates.

    Api

    stable

  • Get the extent of the geometry.

    Parameters

    • Optional opt_extent: Extent

      Extent.

    Returns Extent

    extent Extent.

    Api

    stable

  • Get a list of object property names.

    Returns string[]

    List of property names.

    Api

    stable

  • Return the length of the linestring on projected plane.

    Returns number

    Length (on projected plane).

    Api

    stable

  • Get an object of all property names and values.

    Returns {
        [k: string]: any;
    }

    Object.

    • [k: string]: any

    Api

    stable

  • Get the version number for this object. Each time the object is modified, its version number will be incremented.

    Returns number

    Revision.

    Api

  • Returns true if this geometry includes the specified coordinate. If the coordinate is on the boundary of the geometry, returns false.

    Parameters

    Returns boolean

    Contains coordinate.

    Api

  • Parameters

    Returns boolean

    Inherit Doc

    Api

    stable

  • Listen for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object to use as this in listener.

    Returns Object | Object[]

    Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

    Api

    stable

  • Listen once for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object to use as this in listener.

    Returns Object | Object[]

    Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

    Api

    stable

  • Rotate the geometry around a given coordinate. This modifies the geometry coordinates in place.

    Parameters

    • angle: number

      Rotation angle in radians.

    • anchor: Coordinate

      The rotation center.

    Returns void

    Abstract

    Api

  • Scale the geometry (with an optional origin). This modifies the geometry coordinates in place.

    Parameters

    • sx: number

      The scaling factor in the x-direction.

    • Optional opt_sy: number

      The scaling factor in the y-direction (defaults to sx).

    • Optional opt_anchor: Coordinate

      The scale origin (defaults to the center of the geometry extent).

    Returns void

    Abstract

    Api

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optional opt_silent: boolean

      Update without triggering an event.

    Returns void

    Api

    stable

  • Set the coordinates of the linestring.

    Parameters

    Returns void

    Api

    stable

  • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

    Parameters

    • values: {
          [k: string]: any;
      }

      Values.

      • [k: string]: any
    • Optional opt_silent: boolean

      Update without triggering an event.

    Returns void

    Api

    stable

  • Create a simplified version of this geometry. For linestrings, this uses the the Douglas Peucker algorithm. For polygons, a quantization-based simplification is used to preserve topology.

    Parameters

    • tolerance: number

      The tolerance distance for simplification.

    Returns ol.geom.Geometry

    A new, simplified version of the original geometry.

    Function

    Api

  • Transform each coordinate of the geometry from one coordinate reference system to another. The geometry is modified in place. For example, a line will be transformed to a line and a circle to a circle. If you do not want the geometry modified in place, first clone() it and then use this function on the clone.

    Parameters

    Returns ol.geom.Geometry

    This geometry. Note that original geometry is modified in place.

    Api

    stable

  • Parameters

    • deltaX: number
    • deltaY: number

    Returns void

    Inherit Doc

    Api

    stable

  • Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object which was used as this by the listener.

    Returns void

    Api

    stable

  • Removes an event listener using the key returned by on() or once(). Note that using the ol.Observable.unByKey static function is to be preferred.

    Parameters

    • key: Object | Object[]

      The key returned by on() or once() (or an array of keys).

    Returns void

    Function

    Api

    stable

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optional opt_silent: boolean

      Unset without triggering an event.

    Returns void

    Api

    stable

  • Removes an event listener using the key returned by on() or once().

    Parameters

    • key: Object | Object[]

      The key returned by on() or once() (or an array of keys).

    Returns void

    Api

    stable

Generated using TypeDoc