Polylgon

Generate a polygon object and display it on map.

Polylgon

mogosmap.maps.Polygon({ option });

Parameters

Parameter (Required)
Description
Remark

path

Each {lat, lng} behaves as a vertex

JSON Array

Parameter (Optional)
Description
Remark

fillColor

Specifies a hexadecimal HTML color of the format "#FFFFFF".

The Polygon class does not support named colors.

(Default : #000000)

Hex

fillOpacity

Specifies a numerical value between 0.0 and 1.0 to determine the opacity of the line's color.

(Default : 1.0)

Numeric

outlineColor

specifies a hexadecimal HTML outline color of the format "#FFFFFF".

The Polygon class does not support named colors.

(Default : #000000)

Hex

text

Optional formatted.

(Default : "")

String

textColor

Optional color.

Defaults to "#000000".

Requires "text" option.

Hex

textHaloColor

Optional color.

Default is "rgba(0, 0, 0, 0)".

Requires "text" option.

rgba

textHaloWidth

Optional number greater than or equal to 0. Units in pixels.

Default is 0.

Requires "text" option.

Numeric

textSize

Optional number greater than or equal to 0.

Units in pixels.

Default is 16.

Requires "text" option.

Numeric

textOffset

Optional array of numbers.

Units in ems.

Default is [0,0].

Requires "text" option.

Numeric

callback

A callback is a function passed as an argument to another function.

Function

Returns

Parameter
Description
Remark

Example

setMap

Parameters

Parameter (Required)
Description
Remark

null

Clear or destroy to generated polyline.

null

Returns

Parameter
Description
Remark

Example

addPolygon

Parameters

Parameter (Required)
Description
Remark

path

The shape of the polyline can be changed by setting new coordinates.

JSON Array

Returns

Parameter
Description
Remark

Example

setVisible

Parameter

Parameter (Required)
Description
Remark

modeShow

Show or hide the generated polyline on the map.

Boolean

Returns

Parameter
Description
Remark

Example

The MOGOS Maps API requires an API Key, which can be obtained from the MOGOS Console website or contact [email protected].

Last updated