KNMapCircle
INFO
This English reference is based on Directions SDK 1.12.12. 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.
Properties
| Name | Description | Type |
|---|---|---|
center | KATEC coordinates where the circle is displayed | @property (nonatomic, assign) FloatPoint center |
radius | Radius of the circle | @property (nonatomic, assign) float radius |
fillColor | Fill color of the circle | @property (nonatomic, assign, nonnull) UIColor* fillColor |
strokeColor | Outline color of the circle | @property (nonatomic, assign, nonnull) UIColor* strokeColor |
strokeWidth | Outline thickness of the circle (range: 1–5) | @property (nonatomic, assign) float strokeWidth |
strokeDashType | Outline type of the circle You can set a solid, dotted, dashed, dash-dotted, or dash-double-dotted line (default: KNLineDashType_Solid) | @property (nonatomic, assign) KNLineDashType strokeDashType |
priority | Display priority of the circle. A higher number is displayed on top (default: 0, priority setting range: 0 to 65535) | @property (nonatomic, readwrite, assign) NSInteger priority |
isVisible | Whether the circle is visible. (default: YES) | @property (nonatomic, assign) BOOL isVisible |
tag | Tag assigned to the circle (tag)The tag takes an Integer value and can be used to classify the circle by category or to identify it separately. (optional) | @property (nonatomic, assign) NSInteger tag |
TIP
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.
Example code — KNMapCircle Example code for using the property
objc
// KATEC coordinates where the circle is displayed
circle.center = newValue;
FloatPoint centerCoordinate = circle.center;
// Radius of the circle
circle.radius = newValue;
FloatPoint radius = circle.radius;
// Fill color of the circle
circle.fillColor = [UIColor blueColor];
UIColor* fillColor = circle.fillColor;
// Outline color of the circle
circle.strokeColor = [UIColor blueColor];
UIColor* strokeColor = circle.strokeColor;
// Stroke width of the circle
circle.strokeWidth = newValue;
float strokeWidth = circle.strokeWidth;
// Outline type of the circle
circle.strokeDashType = KNLineDashType_Solid;
KNLineDashType dashType = circle.strokeDashType;
// Whether to show the circle
circle.isVisible = newValue;
BOOL visible = circle.isVisible;
// Set the display priority of the circle
circle.priority = newValue;
NSInteger priority = circle.priority;
// Tag for the circle
circle.tag = newValue;
NSInteger tag = circle.tag;Constructor
+ circle;
Creates a KNMapCircle object.
objc
+ (KNMapCircle* _Nonnull)circle;+ circleWithCenter:radius
Creates a KNMapCircle object using KATEC coordinates and a radius.
Example code — + circleWithCenter:radius:
objc
IntPoint mapPos = [[KNSDK sharedInstance] convertWGS84ToKATECWithLongitude:127.11019081347423 latitude:37.3941851228957];
KNMapCircle *circle = [KNMapCircle circleWithCenter:FloatPointMake(mapPos.x, mapPos.y) radius:100.0f];
circle.strokeColor = [UIColor redColor];
circle.fillColor = [UIColor blueColor];
circle.strokeWidth = 5.0;
circle.strokeDashType = KNLineDashType_Solid;
circle.isVisible = YES;
circle.priority = 10;
circle.tag = 1;
[self->mapView addCircle:circle];objc
+(KNMapCircle* _Nonnull) circleWithCenter: (FloatPoint) aCenter
radius: (float) aRadiusParameters
| Name | Description |
|---|---|
aCenter | Center of the Circle |
aRadius | Radius of the Circle |