logo
API Documentation
Tutorials
Getting Started Initialization Layers Third party Controls Geometries Vector styles Measures InfoBox Utils
Releases

Documentation

Modules

  • Constants

Events

  • FEATURE_CLICK
  • FEATURE_HOVER
  • CENTER_DATE_IMAGE
  • CHANGE_MEASURE
  • CLICK
  • COMPLETE_COLLECTIONS
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • FINISH_MEASURE
  • MAP_INITIALIZE
  • MAP_STATUS_EVENT
  • MOVE_END
  • NO_3D_IMAGES
  • POINTER_MOVE
  • START_MEASURE
  • TILES_END_LOAD
  • TILES_START_LOAD
  • FEATURE_CLICK
  • FEATURE_HOVER

General

Classes / Controls

  • Bar
  • Button
  • Swipe
  • Toggle

Classes / Managers

  • CollectionManager
  • OverlayManager

Classes

  • Map

Classes / View

  • MapStatusView

Geometry

Classes

  • Extent
  • Feature
  • Line
  • Location
  • MultiPolygon
  • Point
  • Polygon

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Classes

  • ArcGISLayer
  • BingLayer
  • GroupLayer
  • ImageryLayer
  • OSMLayer
  • VectorLayer
  • VectorTileLayer
  • WFSLayer
  • WMSLayer
  • WMTSLayer
  • XYZLayer

Classes / Base Layers

  • BaseLayer
  • BaseVectorLayer

Measurements

Classes / Tools

  • CircleTool
  • HeightTool
  • LineTool
  • PointTool
  • PolygonTool
  • RectangleTool
  • RelativeHeightTool

Classes

  • Measure

Objects

Classes

  • Collection
  • CollectionStatus
  • Image
  • LayerCollections
  • LayerCollectionsStatus
  • MapStatus

Services

Classes

  • UserService

Styles

Classes

  • Circle
  • Fill
  • Icon
  • RegularShape
  • Stroke
  • Style
  • Text

Utils

Classes

  • Transform

Class

RegularShape

RegularShape(opts)

Set regular shape style for vector features. The resulting shape will be a regular polygon when radius is provided, or a star when radius1 and radius2 are provided.

Learn more about implementing regular shape style in our Point shapes styles tutorial.

Constructor

# new RegularShape(opts)

Initialization object

Parameters:
Name Type Attributes Default Description
opts object

Options

fill Fill <optional>

Fill style.

points number <optional>

Number of points for stars and regular polygons. In case of a polygon, the number of points is the number of sides.

radius number <optional>

Radius of a regular polygon.

radius1 number <optional>

Outer radius of a star.

radius2 number <optional>

Inner radius of a star.

angle number <optional>
0

Shape's angle in radians. A value of 0 will have one of the shape's point facing up.

displacement Array.<number> <optional>
[0,0]

Displacement of the shape

stroke stroke <optional>

Stroke style.

rotation number <optional>
0

Rotation in radians (positive rotation clockwise).

rotateWithView boolean <optional>
false

Whether to rotate the shape with the view.

scale number <optional>
1

Scale. Unless two dimensional scaling is required a better result may be obtained with appropriate settings for radius, radius1 and radius2.

Tutorials:
  • Point shapes styles

Classes

RegularShape

Methods

# getAnchor() → {Array.<number>}

Get the anchor point in pixels. The anchor determines the center point for the symbolizer.

Anchor.

Array.<number>

# getAngle() → {number}

Get the angle used in generating the shape.

Shape's rotation in radians.

number

# getDisplacement() → {Array.<number>}

Get the displacement of the shape

Shape's center displacement

Array.<number>

# getFill() → {Fill}

Get the fill style for the shape.

Fill style.

Fill

# getOpacity() → {number}

Get the symbolizer opacity.

Opacity.

number

# getPoints() → {number}

Get the number of points for generating the shape.

Number of points for stars and regular polygons.

number

# getRadius() → {number}

Get the (primary) radius for the shape.

Radius.

number

# getRadius2() → {number|undefined}

Get the secondary radius for the shape.

Radius2.

number | undefined

# getRotateWithView() → {boolean}

Determine whether the symbolizer rotates with the map.

Rotate with map.

boolean

# getRotation() → {number}

Get the symoblizer rotation.

Rotation.

number

# getScale() → {number}

Get the symbolizer scale.

Scale.

number

# getSize() → {number}

Get the size of the symbolizer (in pixels).

Size.

number

# getStroke() → {Stroke}

Get the stroke style for the shape.

Stroke style.

Stroke

# setFill(fill)

Set the fill style.

Parameters:
Name Type Description
fill Fill

# setOpacity(opacity)

Set the opacity.

Parameters:
Name Type Description
opacity number

Opacity.

# setRotateWithView(rotateWithView)

Set whether to rotate the style with the view.

Parameters:
Name Type Description
rotateWithView boolean

Rotate with map.

# setRotation(rotation)

Set the rotation.

Parameters:
Name Type Description
rotation number

Rotation.

# setScale(scale)

Set the scale.

Parameters:
Name Type Description
scale number

Scale.

Documentation generated by Vexcel Imaging