Represents a circle on the location view.
More...
#include <com/navigine/idl/objc/NCCircleMapObject.h>
|
| (BOOL) | - setPosition:sublocationId: |
| | Method is used to specify the center of the circle.
|
| |
| (BOOL) | - setPositionAnimated:sublocationId:duration:type: |
| | Method is used to move the center of the circle with the specified animation.
|
| |
| (BOOL) | - setColor: |
| | Method is used to specify the fill color of the circle.
|
| |
| (BOOL) | - setRadius: |
| | Method is used to specify the size of the circle.
|
| |
| (BOOL) | - setCollisionEnabled: |
| | Method is used to enable or disable collision detection for the circle.
|
| |
| (BOOL) | - setBuffer:height: |
| | Method is used to specify the buffer size around the circle for collision detection.
|
| |
| (BOOL) | - setOffset:height: |
| | Method is used to specify an offset for the circle’s position.
|
| |
| (BOOL) | - setPriority: |
| | Method is used to specify the priority of the circle.
|
| |
| (BOOL) | - setOutlineColor: |
| | Method is used to specify the color of the circle’s outline.
|
| |
| (BOOL) | - setOutlineRadius: |
| | Method is used to specify the thickness of the circle’s outline.
|
| |
| (BOOL) | - setOutlineAlpha: |
| | Method is used to specify the opacity of the circle’s outline.
|
| |
| (int32_t) | - getId |
| | Gets the unique identifier of the map object.
|
| |
| (NCMapObjectType) | - getType |
| | Gets the type of the map object.
|
| |
| (nonnull NSData *) | - getData |
| | Gets the user-defined data associated with the map object.
|
| |
| (BOOL) | - setVisible: |
| | Method is used to specify the visibility of the map object.
|
| |
| (BOOL) | - setInteractive: |
| | Method is used to specify whether the map object can be interacted with.
|
| |
| (void) | - setData: |
| | Method is used to set user-defined data for the map object.
|
| |
| (BOOL) | - setTitle: |
| | Method is used to set the title of the map object.
|
| |
| (BOOL) | - setTitleWithStyle:style: |
| | Method is used to set the title and its style for the map object.
|
| |
| (BOOL) | - setAlpha: |
| | Method is used to set the opacity of the map object.
|
| |
Represents a circle on the location view.
Referenced from LocationWindow.
Definition at line 23 of file NCCircleMapObject.h.
◆ getData
| - (nonnull NSData *) getData |
|
|
|
Gets the user-defined data associated with the map object.
- Returns
- The data stored in the map object.
Swift code snippet:
// Get custom data
let retrievedData = circleMapObject.data
print("Circle custom data: \(retrievedData)")
Objective C code snippet:
NSDictionary *retrievedData = circleObject.data;
NSLog(@"Circle custom data: %@", retrievedData);
◆ getId
Gets the unique identifier of the map object.
- Returns
- The unique identifier of the map object.
Swift code snippet:
// Get object ID
let objectId = circleMapObject.id
print("Circle object ID: \(objectId)")
Objective C code snippet:
NSInteger objectId = circleObject.id;
NSLog(@"Circle object ID: %ld", (long)objectId);
◆ getType
Gets the type of the map object.
- Returns
- The type of the map object MapObjectType.
Swift code snippet:
// Get object type
let objectTypeString = circleMapObject.type
print("Circle object type: \(objectTypeString)")
Objective C code snippet:
NSString *objectTypeString = circleObject.type;
NSLog(@"Circle object type: %@", objectTypeString);
◆ setAlpha:
| - (BOOL) setAlpha: |
|
(float) | alpha |
|
Method is used to set the opacity of the map object.
- Parameters
-
| alpha | Opacity multiplier. Values below 0 will be set to 0. Values above 1 will be set to 1. Default: 1. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set alpha transparency
let alphaSuccess = circleMapObject.setAlpha(0.7)
print("Set circle alpha to 0.7: \(alphaSuccess)")
Objective C code snippet:
BOOL alphaSuccess = [circleObject
setAlpha:0.7];
NSLog(@"Set circle alpha to 0.7: %@", alphaSuccess ? @"YES" : @"NO");
◆ setBuffer:height:
| - (BOOL) setBuffer: |
|
(float) | width |
| height: |
|
(float) | height |
Method is used to specify the buffer size around the circle for collision detection.
- Parameters
-
| width | Width of the buffer in pixels. Default: 0. |
| height | Height of the buffer in pixels. Default: 0. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set collision buffer
let bufferSuccess = circleMapObject.setBuffer(width: 5.0, height: 5.0)
print("Set collision buffer to 5x5 pixels: \(bufferSuccess)")
Objective C code snippet:
BOOL bufferSuccess = [circleObject setBufferWithWidth:5.0 height:5.0];
NSLog(@"Set collision buffer to 5x5 pixels: %@", bufferSuccess ? @"YES" : @"NO");
◆ setCollisionEnabled:
| - (BOOL) setCollisionEnabled: |
|
(BOOL) | enabled |
|
Method is used to enable or disable collision detection for the circle.
- Parameters
-
| enabled | Specifies whether collision detection is enabled (true) or disabled (false). Default: false. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Enable collision detection
let collisionSuccess = circleMapObject.setCollisionEnabled(true)
print("Enabled collision detection for circle: \(collisionSuccess)")
Objective C code snippet:
NSLog(@"Enabled collision detection for circle: %@", collisionSuccess ? @"YES" : @"NO");
◆ setColor:
| - (BOOL) setColor: |
|
(nonnull UIColor *) | color |
|
Method is used to specify the fill color of the circle.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set circle color
let colorSuccess = circleMapObject.setColor(UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.8))
print("Set circle color to red with 80% opacity: \(colorSuccess)")
Objective C code snippet:
BOOL colorSuccess = [circleObject
setColor:[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.8]];
NSLog(@"Set circle color to red with 80%% opacity: %@", colorSuccess ? @"YES" : @"NO");
◆ setData:
| - (void) setData: |
|
(nonnull NSData *) | data |
|
Method is used to set user-defined data for the map object.
- Parameters
-
| data | Data to store in the map object. |
Swift code snippet:
// Set custom data
let customData = ["key": "value", "number": "42"]
let dataSuccess = circleMapObject.setData(customData)
print("Set circle custom data: \(dataSuccess)")
Objective C code snippet:
NSDictionary *customData = @{@"key": @"value", @"number": @"42"};
BOOL dataSuccess = [circleObject
setData:customData];
NSLog(@"Set circle custom data: %@", dataSuccess ? @"YES" : @"NO");
◆ setInteractive:
| - (BOOL) setInteractive: |
|
(BOOL) | interactive |
|
Method is used to specify whether the map object can be interacted with.
- Parameters
-
| interactive | Specifies whether the object can be picked in the pickMapObjectAt method (true) or not (false). Default: false. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set interactive mode
let interactiveSuccess = circleMapObject.setInteractive(true)
print("Set circle interactive to true: \(interactiveSuccess)")
Objective C code snippet:
NSLog(@"Set circle interactive to true: %@", interactiveSuccess ? @"YES" : @"NO");
◆ setOffset:height:
| - (BOOL) setOffset: |
|
(float) | width |
| height: |
|
(float) | height |
Method is used to specify an offset for the circle’s position.
- Parameters
-
| width | Horizontal offset in pixels. |
| height | Vertical offset in pixels. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set position offset
let offsetSuccess = circleMapObject.setOffset(x: 2.0, longitude: 3.0)
print("Set position offset to (2.0, 3.0) pixels: \(offsetSuccess)")
Objective C code snippet:
BOOL offsetSuccess = [circleObject setOffsetWithX:2.0 longitude:3.0];
NSLog(@"Set position offset to (2.0, 3.0) pixels: %@", offsetSuccess ? @"YES" : @"NO");
◆ setOutlineAlpha:
| - (BOOL) setOutlineAlpha: |
|
(float) | alpha |
|
Method is used to specify the opacity of the circle’s outline.
- Parameters
-
| alpha | Opacity multiplier (0 to 1). Values below 0 are set to 0. Default: 1. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set outline alpha
let outlineAlphaSuccess = circleMapObject.setOutlineAlpha(0.5)
print("Set circle outline alpha to 0.5: \(outlineAlphaSuccess)")
Objective C code snippet:
NSLog(@"Set circle outline alpha to 0.5: %@", outlineAlphaSuccess ? @"YES" : @"NO");
◆ setOutlineColor:
| - (BOOL) setOutlineColor: |
|
(nonnull UIColor *) | color |
|
Method is used to specify the color of the circle’s outline.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set outline color
let outlineColorSuccess = circleMapObject.setOutlineColor(UIColor(red: 0.0, green: 0.0, blue: 1.0, alpha: 1.0))
print("Set circle outline color to blue: \(outlineColorSuccess)")
Objective C code snippet:
BOOL outlineColorSuccess = [circleObject
setOutlineColor:[UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:1.0]];
NSLog(@"Set circle outline color to blue: %@", outlineColorSuccess ? @"YES" : @"NO");
◆ setOutlineRadius:
| - (BOOL) setOutlineRadius: |
|
(float) | radius |
|
Method is used to specify the thickness of the circle’s outline.
- Parameters
-
| radius | Thickness of the outline in pixels. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set outline radius
let outlineRadiusSuccess = circleMapObject.setOutlineRadius(2.0)
print("Set circle outline radius to 2.0: \(outlineRadiusSuccess)")
Objective C code snippet:
NSLog(@"Set circle outline radius to 2.0: %@", outlineRadiusSuccess ? @"YES" : @"NO");
◆ setPosition:sublocationId:
| - (BOOL) setPosition: |
|
(nonnull NCGlobalPoint *) | point |
| sublocationId: |
|
(nullable NSNumber *) | sublocationId |
Method is used to specify the center of the circle.
- Parameters
-
| point | WGS84 coordinates of the center GlobalPoint. |
| sublocationId | Floor this object is attached to, or null for the outdoor map. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set circle position
let centerPoint = NCGlobalPoint(latitude: 100.0, longitude: 200.0)
let success = circleMapObject.setPosition(centerPoint, sublocationId: 7)
print("Set circle position to (\(centerPoint.latitude), \(centerPoint.longitude)): \(success)")
Objective C code snippet:
NCGlobalPoint *centerPoint = [[
NCGlobalPoint alloc] initWithLatitude:100.0 longitude:200.0];
NSLog(
@"Set circle position to (%f, %f): %@", centerPoint.
latitude, centerPoint.
longitude, success ?
@"YES" :
@"NO");
◆ setPositionAnimated:sublocationId:duration:type:
| - (BOOL) setPositionAnimated: |
|
(nonnull NCGlobalPoint *) | point |
| sublocationId: |
|
(nullable NSNumber *) | sublocationId |
| duration: |
|
(float) | duration |
| type: |
|
(NCAnimationType) | type |
Method is used to move the center of the circle with the specified animation.
- Parameters
-
| point | WGS84 coordinates of the center GlobalPoint. |
| sublocationId | Floor this object is attached to, or null for the outdoor map. |
| duration | Animation duration in seconds. |
| type | Animation type AnimationType. Default: CENTER. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set circle position with animation
let animatedPoint = NCGlobalPoint(latitude: 150.0, longitude: 250.0)
let animatedSuccess = circleMapObject.setPositionAnimated(animatedPoint, duration: 2.0, animationType: .linear)
print("Set circle position with animation to (\(animatedPoint.latitude), \(animatedPoint.longitude)): \(animatedSuccess)")
Objective C code snippet:
NCGlobalPoint *animatedPoint = [[
NCGlobalPoint alloc] initWithLatitude:150.0 longitude:250.0];
BOOL animatedSuccess = [circleObject setPositionAnimated:animatedPoint duration:2.0 animationType:AnimationTypeLinear];
NSLog(
@"Set circle position with animation to (%f, %f): %@", animatedPoint.
latitude, animatedPoint.
longitude, animatedSuccess ?
@"YES" :
@"NO");
◆ setPriority:
| - (BOOL) setPriority: |
|
(float) | priority |
|
Method is used to specify the priority of the circle.
- Parameters
-
| priority | The priority value for rendering or interaction. Default: 0. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set rendering priority
let prioritySuccess = circleMapObject.setPriority(1)
print("Set rendering priority to 1: \(prioritySuccess)")
Objective C code snippet:
NSLog(@"Set rendering priority to 1: %@", prioritySuccess ? @"YES" : @"NO");
◆ setRadius:
| - (BOOL) setRadius: |
|
(float) | radius |
|
Method is used to specify the size of the circle.
- Parameters
-
| radius | Radius of the circle in meters. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set circle radius
let radiusSuccess = circleMapObject.setRadius(10.0)
print("Set circle radius to 10.0 meters: \(radiusSuccess)")
Objective C code snippet:
BOOL radiusSuccess = [circleObject
setRadius:10.0];
NSLog(@"Set circle radius to 10.0 meters: %@", radiusSuccess ? @"YES" : @"NO");
◆ setTitle:
| - (BOOL) setTitle: |
|
(nonnull NSString *) | title |
|
Method is used to set the title of the map object.
- Parameters
-
| title | The title to display on the location view. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set title
let titleSuccess = circleMapObject.setTitle("Circle Object")
print("Set circle title to 'Circle Object': \(titleSuccess)")
Objective C code snippet:
BOOL titleSuccess = [circleObject
setTitle:@"Circle Object"];
NSLog(@"Set circle title to 'Circle Object': %@", titleSuccess ? @"YES" : @"NO");
◆ setTitleWithStyle:style:
| - (BOOL) setTitleWithStyle: |
|
(nonnull NSString *) | title |
| style: |
|
(nonnull NCTitleStyle *) | style |
Method is used to set the title and its style for the map object.
- Parameters
-
| title | The title to display on the location view. |
| style | Title style parameters TitleStyle. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set title with style
let titleStyleSuccess = circleMapObject.setTitleWithStyle("Styled Circle", style: titleStyle)
print("Set circle title with style: \(titleStyleSuccess)")
Objective C code snippet:
NSLog(@"Set circle title with style: %@", titleStyleSuccess ? @"YES" : @"NO");
◆ setVisible:
| - (BOOL) setVisible: |
|
(BOOL) | visible |
|
Method is used to specify the visibility of the map object.
- Parameters
-
| visible | Specifies whether the object is visible (true) or hidden (false). Default: true. |
- Returns
- true if the operation is successful, false otherwise.
Swift code snippet:
// Set visibility
let visibleSuccess = circleMapObject.setVisible(true)
print("Set circle visibility to true: \(visibleSuccess)")
Objective C code snippet:
BOOL visibleSuccess = [circleObject
setVisible:YES];
NSLog(@"Set circle visibility to true: %@", visibleSuccess ? @"YES" : @"NO");
◆ valid
Tells if this object is valid or not. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now.
Definition at line 230 of file NCCircleMapObject.h.
The documentation for this class was generated from the following file: