PilotGaea 2D O'view
    正在準備搜尋索引...

    類別 Polygon

    Polygon geometry.

    Coordinates.

    Layout.

    stable

    層級 (查看層級一覽)

    索引

    方法

    • Create an approximation of a circle on the surface of a sphere.

      參數

      • sphere: Sphere

        The sphere.

      • center: Coordinate

        Center ([lon, lat] in degrees).

      • radius: number

        The great-circle distance from the center to the polygon vertices.

      • 可選opt_n: number

        Optional number of vertices for the resulting polygon. Default is 32.

      回傳 ol.geom.Polygon

      The "circular" polygon.

      stable

    • Create a polygon from an extent. The layout used is XY.

      參數

      回傳 ol.geom.Polygon

      The polygon.

    • Create a regular polygon from a circle.

      參數

      • circle: ol.geom.Circle

        Circle geometry.

      • 可選opt_sides: number

        Number of sides of the polygon. Default is 32.

      • 可選opt_angle: number

        Start angle for the first vertex of the polygon in radians. Default is 0.

      回傳 ol.geom.Polygon

      Polygon geometry.

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

      參數

      • key: Object | Object[]

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

      回傳 void

      stable

    • Append the passed linear ring to this polygon.

      參數

      回傳 void

      stable

    • Make a complete copy of the geometry.

      回傳 ol.geom.Polygon

      Clone.

      stable

    • Return the area of the polygon on projected plane.

      回傳 number

      Area (on projected plane).

      stable

    • Get the coordinate array for this geometry. This array has the structure of a GeoJSON coordinate array for polygons.

      參數

      • 可選opt_right: boolean

        Orient coordinates according to the right-hand rule (counter-clockwise for exterior and clockwise for interior rings). If false, coordinates will be oriented according to the left-hand rule (clockwise for exterior and counter-clockwise for interior rings). By default, coordinate orientation will depend on how the geometry was constructed.

      回傳 Coordinate[][]

      Coordinates.

      stable

    • Return an interior point of the polygon.

      回傳 ol.geom.Point

      Interior point.

      stable

    • Return the number of rings of the polygon, this includes the exterior ring and any interior rings.

      回傳 number

      Number of rings.

    • Return the Nth linear ring of the polygon geometry. Return null if the given index is out of range. The exterior linear ring is available at index 0 and the interior rings at index 1 and beyond.

      參數

      • index: number

        Index.

      回傳 LinearRing

      Linear ring.

      stable

    • Return the linear rings of the polygon.

      回傳 LinearRing[]

      Linear rings.

      stable

    • 參數

      回傳 boolean

      stable

    • Set the coordinates of the polygon.

      參數

      回傳 void

      stable

    • 參數

      • deltaX: number
      • deltaY: number

      回傳 void

      stable

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

      參數

      回傳 boolean

      Contains coordinate.

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

      參數

      • angle: number

        Rotation angle in radians.

      • anchor: Coordinate

        The rotation center.

      回傳 void

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

      參數

      • sx: number

        The scaling factor in the x-direction.

      • 可選opt_sy: number

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

      • 可選opt_anchor: Coordinate

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

      回傳 void

    • 函數

      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.

      參數

      • tolerance: number

        The tolerance distance for simplification.

      回傳 ol.geom.Geometry

      A new, simplified version of the original geometry.

    • 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.

      參數

      回傳 ol.geom.Geometry

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

      stable

    • Gets a value.

      參數

      • key: string

        Key name.

      回傳 any

      Value.

      stable

    • Get a list of object property names.

      回傳 string[]

      List of property names.

      stable

    • Get an object of all property names and values.

      回傳 { [k: string]: any }

      Object.

      stable

    • Sets a value.

      參數

      • key: string

        Key name.

      • value: any

        Value.

      • 可選opt_silent: boolean

        Update without triggering an event.

      回傳 void

      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).

      參數

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

        Values.

      • 可選opt_silent: boolean

        Update without triggering an event.

      回傳 void

      stable

    • Unsets a property.

      參數

      • key: string

        Key name.

      • 可選opt_silent: boolean

        Unset without triggering an event.

      回傳 void

      stable

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

      回傳 void

    • 函數

      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.

      參數

      回傳 void

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

      回傳 number

      Revision.

    • Listen for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object to use as this in listener.

      回傳 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.

      stable

    • Listen once for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object to use as this in listener.

      回傳 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.

      stable

    • Unlisten for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object which was used as this by the listener.

      回傳 void

      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.

      參數

      • key: Object | Object[]

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

      回傳 void

      stable

    構造函數