Circle

Generate a circle object and display it on the map.

Circle

mogosmap.maps.Circle({ option });

Parameters

Parameter (Required)
Description
Remark

center

center coordinate in latitude/longitude for circle

JSON

radius

specifies the radius of the circle in meter

Numeric

Parameter (Optional)
Description
Remark

fillColor

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

The Circle 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 fill's color.

(Default : 1.0)

Numeric

text

Optional color.

Defaults to "#000000".

Requires "text" option.

String

textColor

Optional color.

Defaults to "#000000".

Requires "text" option.

Hex (String)

textHaloColor

Optional color.

Defaults to "rgba(0, 0, 0, 0)".

Requires "text" option.

rgba

textHaloWidth

Optional number greater than or equal to 0.

Units in pixels.

Defaults to 0.

Requires "text" option.

Numeric

textSize

Optional number greater than or equal to 0.

Units in pixels.

Defaults to 16.

Requires "text" option.

Numeric

textOffset

Optional array of numbers. Units in ems.

Defaults to [0,0].

Requires "text" option.

Numeric Array

callback

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

Function

Returns

Parameter
Description
Remark

Example

let center = {lat: 37.5650745, lng:126.9850103}

let cityCircle = new mogosmap.maps.Circle({	
    fillColor: '#FF0000',	
    fillOpacity: 0.35,	
    center: center,
    radius:10*100,
    text: 'MOGOS',
    textColor:'#fff',
    textSize: 25,
    textOffset:[5,4],
    textHaloWidth:10
});	
	
cityCircle.setMap(mapInstance);

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

Last updated