KNMapCircle
INFO
This English reference is based on Directions SDK 1.12.8-hotfix02. For the latest version, see the Korean reference.
Creates a circle to display on the map. You can set the outline and fill colors and the line type. To add a circle to the map, create a KNMapCircle object and register it with KNMapView.
Constructor
Creates a KNMapCircle object using KATEC coordinates and a radius.
kotlin
KNMapCircle(center: FloatPoint, radius: Float, fillColor: Int, strokeColor: Int, strokeWidth: Float, strokeDashType: KNLineDashType, priority: Int)TIP
centerandradiusare required.- A marker always has a higher priority than other objects such as circles and polygons. Therefore, even if the values overlap, the marker is displayed on the top layer.
Properties
| Name | Description | Type |
|---|---|---|
center | KATEC coordinates where the circle is displayed | var center: FloatPoint |
radius | Radius of the circle | var radius: Float |
fillColor | Fill color of the circle | var fillColor: Int |
strokeColor | Outline color of the circle | var strokeColor: Int |
strokeWidth | Outline thickness of the circle (range: 1–5) | var strokeWidth: Float |
strokeDashType | Outline type of the circle You can set a solid, dotted, dashed, dash-dotted, or dash-double-dotted line (default: KNLineDashType_Solid) | var strokeDashType: KNLineDashType |
priority | Circle display priority. A higher number is displayed on top. (default: 0, priority setting range: 0~65535) | var priority: Int |
isVisible | Whether the circle is visible (default: true) | var isVisible: Boolean |
tag | Tag assigned to the circle (tag)Tags are Int values that can categorize or distinguish circles. (optional) | var tag: Int |
id (readOnly) | Unique ID of the circle | var id: Int |
Example code — KNMapCircle
kotlin
fun createCircleWithMapView(): KNMapCircle {
val center = WGS84ToKATEC(127.11019081347423,37.3941851228957)
return KNMapCircle(center, 100f,
fillColor = Color.BLUE,
strokeColor = Color.YELLOW,
strokeWidth = 2f,
strokeDashType = KNLineDashType.KNLineDashType_Dotted,
1)
}