Loading...
Searching...
No Matches

Interface for interacting with the location view. More...

#include <com/navigine/idl/objc/NCLocationWindow.h>

Inherits NSObject.

Instance Methods

(void) - setSublocationId:
 Method is used to switch the location view between sublocations (e.g., floors).
 
(nullable NSNumber *) - getSublocationId
 Returns current sublocation ID if set, otherwise null.
 
(void) - setOperatingMode:
 Sets the operating mode of the location view OperatingMode. Default: indoor_only.
 
(NCOperatingMode- getOperatingMode
 Returns the current operating mode OperatingMode.
 
(nonnull NSString *) - getAttribution
 OSM attribution text shown when the outdoor vector basemap is active. Fixed string required by the OpenStreetMap license / vector tile policy.
 
(nonnull NCCamera *) - getEnclosingCamera:
 Calculates camera that fits provided bounding box.
 
(nonnull NCGlobalPoint *) - screenPositionToGlobal:
 Converts screen coordinates (pixels) to WGS84 coordinates.
 
(CGPoint) - globalToScreenPosition:clipToViewport:
 Converts WGS84 coordinates to screen coordinates (pixels).
 
(nullable NCCircleMapObject *) - addCircleMapObject
 Creates and adds a circle map object to the location view.
 
(BOOL) - removeCircleMapObject:
 Removes a circle map object from the location view.
 
(nullable NCIconMapObject *) - addIconMapObject
 Creates and adds an icon map object to the location view.
 
(BOOL) - removeIconMapObject:
 Removes an icon map object from the location view.
 
(nullable NCClusterMapObjectController *) - addClusterMapObjectController
 Creates an icon map object controller for the location view.
 
(BOOL) - removeClusterMapObjectController:
 Removes an icon map object controller from the location view.
 
(nullable NCPolygonMapObject *) - addPolygonMapObject
 Creates and adds a polygon map object to the location view.
 
(BOOL) - removePolygonMapObject:
 Removes a polygon map object from the location view.
 
(nullable NCPolylineMapObject *) - addPolylineMapObject
 Creates and adds a polyline map object to the location view.
 
(BOOL) - removePolylineMapObject:
 Removes a polyline map object from the location view.
 
(nullable NCDottedPolylineMapObject *) - addDottedPolylineMapObject
 Creates and adds a polyline points map object to the location view.
 
(BOOL) - removeDottedPolylineMapObject:
 Removes a polyline points map object from the location view.
 
(nullable NCModelMapObject *) - addModelMapObject
 Creates and adds a 3D model map object (Wavefront OBJ + texture via ModelProvider).
 
(BOOL) - removeModelMapObject:
 Removes a model map object from the location view.
 
(void) - removeAllMapObjects
 Removes all map objects from the location view.
 
(void) - pickMapObjectAt:
 Selects a visible, interactive map object at the specified screen position.
 
(void) - pickMapFeatureAt:
 Selects visible map features (e.g., venues) at the specified screen position.
 
(void) - addPickListener:
 Adds a PickListener to receive picking result events.
 
(void) - removePickListener:
 Removes a previously added PickListener.
 
(void) - addInputListener:
 Adds an InputListener to receive input events.
 
(void) - removeInputListener:
 Removes a previously added InputListener.
 
(void) - addCameraListener:
 Adds a CameraListener to receive camera movement events.
 
(void) - removeCameraListener:
 Removes a previously added CameraListener.
 
(void) - addSublocationChangeListener:
 Adds listener for sublocation change events.
 
(void) - removeSublocationChangeListener:
 Removes previously added sublocation change listener.
 
(void) - addBuildingListener:
 Adds listener for outdoor scenario: when camera focuses on a building or leaves it.
 
(void) - removeBuildingListener:
 Removes previously added indoor building listener.
 
(void) - flyTo:duration:callback:
 Moves the map camera to a new position with an easing animation.
 
(void) - moveTo:duration:animationType:callback:
 Moves the map camera to a new position with a smooth pan-and-zoom animation.
 
(BOOL) - selectMapFeature:
 Selects a map feature by its feature ID.
 
(BOOL) - deselectMapFeature:
 Deselects a map feature by its feature ID.
 
(void) - deselectAllMapFeatures
 Deselects all currently selected map features.
 
(void) - applyLayerFilter:conditions:
 Applies a typed filter to a specific map layer.
 

Class Methods

(void) + setDebugFlag:on:
 Sets the state of a debug flag.
 
(BOOL) + getDebugFlag:
 Gets the state of a debug flag.
 

Properties

NCAttributionAlignmentattributionAlignment
 Screen placement of the OSM attribution overlay AttributionAlignment. Default: right + bottom. Visible only in outdoor / outdoor_indoor modes.
 
float zoomFactor
 Specifies the zoom level of the location view, in pixels per meter. Default: approximately 100 meters across the screen width.
 
float minZoomFactor
 Minimum zoom level for the location view (pixels per meter).
 
float maxZoomFactor
 Maximum zoom level for the location view (pixels per meter).
 
BOOL stickToBorder
 Specifies whether sublocation content sticks to screen borders.
 
NCCameracamera
 Current camera position (look-at in WGS84). Camera.
 
BOOL rotateGestureEnabled
 Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.
 
BOOL tiltGesturesEnabled
 Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.
 
BOOL scrollGesturesEnabled
 Specifies whether scroll gestures (e.g., pan gesture) are enabled.
 
BOOL zoomGesturesEnabled
 Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.
 
float pickRadius
 Extra slop around the hit target, in density-independent pixels. Applied as a screen-pixel radius for points/lines and as a margin around a label's real AABB. Default: 5 dp.
 
NSArray< NSString * > * selectedMapFeatures
 List of currently selected map feature IDs.
 
BOOL valid
 

Detailed Description

Interface for interacting with the location view.

Referenced from LocationView.

Definition at line 41 of file NCLocationWindow.h.

Method Documentation

◆ addBuildingListener:

- (void) addBuildingListener: (nullable id< NCBuildingListener >) listener

Adds listener for outdoor scenario: when camera focuses on a building or leaves it.

Parameters
listenerIndoor building listener BuildingListener.

Swift code snippet:

locationWindow.addBuildingListener(listener)
print("Added building listener")

Objective C code snippet:

[_locationWindow addBuildingListener:_buildingListener];
NSLog(@"Added building listener");

◆ addCameraListener:

- (void) addCameraListener: (nullable id< NCCameraListener >) listener

Adds a CameraListener to receive camera movement events.

Parameters
listenerThe CameraListener instance CameraListener.
Note
Remove the listener when no longer needed.

Swift code snippet:

// Add camera listener
cameraListener = CameraListenerImpl()
locationWindow.addCameraListener(cameraListener!)
print("Added camera listener")

Objective C code snippet:

// Add camera listener
[_locationWindow addCameraListener:_cameraListener];
NSLog(@"Added camera listener");

◆ addCircleMapObject

- (nullable NCCircleMapObject *) addCircleMapObject

Creates and adds a circle map object to the location view.

Returns
A CircleMapObject instance CircleMapObject if successful, null otherwise.

Swift code snippet:

// Add circle map object
circleMapObject = locationWindow.addCircleMapObject()
print("Added circle map object")

Objective C code snippet:

// Add circle map object
[_locationWindow addCircleMapObject:circleObject];
[_mapObjects addObject:circleObject];
NSLog(@"Added circle map object");

◆ addClusterMapObjectController

- (nullable NCClusterMapObjectController *) addClusterMapObjectController

Creates an icon map object controller for the location view.

Returns
Cluster controller instance ClusterMapObjectController.

Swift code snippet:

clusterMapObjectController = locationWindow.addClusterMapObjectController()
print("Added cluster map object controller")

Objective C code snippet:

NCClusterMapObjectController *controller =
[_locationWindow addClusterMapObjectController];
NSLog(@"Added cluster map object controller");

◆ addDottedPolylineMapObject

- (nullable NCDottedPolylineMapObject *) addDottedPolylineMapObject

Creates and adds a polyline points map object to the location view.

Returns
A DottedPolylineMapObject instance DottedPolylineMapObject if successful, null otherwise.

Swift code snippet:

// Add dotted polyline map object
dottedPolylineMapObject = locationWindow.addDottedPolylineMapObject()
print("Added dotted polyline map object")

Objective C code snippet:

// Add dotted polyline map object
[_locationWindow addDottedPolylineMapObject:dottedPolylineObject];
[_mapObjects addObject:dottedPolylineObject];
NSLog(@"Added dotted polyline map object");

◆ addIconMapObject

- (nullable NCIconMapObject *) addIconMapObject

Creates and adds an icon map object to the location view.

Returns
An IconMapObject instance IconMapObject if successful, null otherwise.

Swift code snippet:

// Add icon map object
iconMapObject = locationWindow.addIconMapObject()
print("Added icon map object")

Objective C code snippet:

// Add icon map object
[_locationWindow addIconMapObject:iconObject];
[_mapObjects addObject:iconObject];
NSLog(@"Added icon map object");

◆ addInputListener:

- (void) addInputListener: (nullable id< NCInputListener >) listener

Adds an InputListener to receive input events.

Parameters
listenerThe InputListener instance InputListener.
Note
Remove the listener when no longer needed.

Swift code snippet:

// Add input listener
inputListener = InputListenerImpl()
locationWindow.addInputListener(inputListener!)
print("Added input listener")

Objective C code snippet:

// Add input listener
[_locationWindow addInputListener:_inputListener];
NSLog(@"Added input listener");

◆ addModelMapObject

- (nullable NCModelMapObject *) addModelMapObject

Creates and adds a 3D model map object (Wavefront OBJ + texture via ModelProvider).

Returns
A ModelMapObject instance ModelMapObject if successful, null otherwise.

Swift code snippet:

modelMapObject = locationWindow.addModelMapObject()
print("Added model map object: \‍(modelMapObject != nil)")

Objective C code snippet:

NCModelMapObject *modelObject = [_locationWindow addModelMapObject];
NSLog(@"Added model map object: %@", modelObject != nil ? @"YES" : @"NO");

◆ addPickListener:

- (void) addPickListener: (nullable id< NCPickListener >) listener

Adds a PickListener to receive picking result events.

Parameters
listenerThe PickListener instance PickListener.
Note
Remove the listener when no longer needed.

Swift code snippet:

// Add pick listener
pickListener = PickListenerImpl()
locationWindow.addPickListener(pickListener!)
print("Added pick listener")

Objective C code snippet:

// Add pick listener
_pickListener = [[PickListenerImpl alloc] init];
[_locationWindow addPickListener:_pickListener];
NSLog(@"Added pick listener");

◆ addPolygonMapObject

- (nullable NCPolygonMapObject *) addPolygonMapObject

Creates and adds a polygon map object to the location view.

Returns
A PolygonMapObject instance PolygonMapObject if successful, null otherwise.

Swift code snippet:

// Add polygon map object
polygonMapObject = locationWindow.addPolygonMapObject()
print("Added polygon map object")

Objective C code snippet:

// Add polygon map object
NCPolygonMapObject *polygonObject = [_locationWindow addPolygonMapObject];
NSLog(@"Added polygon map object");

◆ addPolylineMapObject

- (nullable NCPolylineMapObject *) addPolylineMapObject

Creates and adds a polyline map object to the location view.

Returns
A PolylineMapObject instance PolylineMapObject if successful, null otherwise.

Swift code snippet:

// Add polyline map object
polylineMapObject = locationWindow.addPolylineMapObject()
print("Added polyline map object")

Objective C code snippet:

// Add polyline map object
[_locationWindow addPolylineMapObject:polylineObject];
[_mapObjects addObject:polylineObject];
NSLog(@"Added polyline map object");

◆ addSublocationChangeListener:

- (void) addSublocationChangeListener: (nullable id< NCSublocationChangeListener >) listener

Adds listener for sublocation change events.

Parameters
listenerSublocation change listener SublocationChangeListener.

Swift code snippet:

locationWindow.addSublocationChangeListener(listener)
print("Added sublocation change listener")

Objective C code snippet:

[_locationWindow addSublocationChangeListener:listener];
NSLog(@"Added sublocation change listener");

◆ applyLayerFilter:conditions:

- (void) applyLayerFilter: (nonnull NSString *) layer
conditions: (nonnull NSArray< NCMapFilterCondition * > *) conditions 

Applies a typed filter to a specific map layer.

Parameters
layerThe map layer to apply the filter to.
conditionsList of conditions (property + allowed values). Empty list resets the filter (show all).

Swift code snippet:

// Apply filter to venues layer
let conditions = [NCMapFilterCondition(property: "category", values: ["Toilet", "Cafe"])]
locationWindow.applyLayerFilter("venues", conditions: conditions)
print("Applied layer filter: show venues with category Toilet or Cafe")

Objective C code snippet:

// Apply filter to venues layer
NSArray<NCMapFilterCondition *> *conditions = @[[[NCMapFilterCondition alloc] initWithProperty:@"category" values:@[@"Toilet", @"Cafe"]]];
[_locationWindow applyLayerFilterWithLayer:@"venues" conditions:conditions];
NSLog(@"Applied layer filter: show venues with category Toilet or Cafe");

◆ deselectAllMapFeatures

- (void) deselectAllMapFeatures

Deselects all currently selected map features.

Swift code snippet:

// Deselect all map features
locationWindow.deselectAllMapFeatures()
print("Deselected all map features")

Objective C code snippet:

// Deselect all map features
[_locationWindow deselectAllMapFeatures];
NSLog(@"Deselected all map features");

◆ deselectMapFeature:

- (BOOL) deselectMapFeature: (nonnull NSString *) featureId

Deselects a map feature by its feature ID.

Parameters
featureIdThe feature ID from the mapFeaturePickResult PickListener.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Deselect specific map feature
let deselected = locationWindow.deselectMapFeature(featureId)
print("Deselected map feature \‍(featureId): \‍(deselected)")

Objective C code snippet:

// Deselect specific map feature
BOOL deselected = [_locationWindow deselectMapFeature:featureId];
NSLog(@"Deselected map feature %@: %@", featureId, deselected ? @"YES" : @"NO");

◆ flyTo:duration:callback:

- (void) flyTo: (nonnull NCCamera *) camera
duration: (int32_t) duration
callback: (nullable NCCameraCallback) callback 

Moves the map camera to a new position with an easing animation.

Parameters
cameraThe new camera position Camera.
durationAnimation duration in milliseconds.
callbackCallback to execute when the animation completes CameraCallback.

Swift code snippet:

// Fly to position with smooth animation
let targetPoint = NCGlobalPoint(latitude: 150.0, longitude: 250.0)
let targetCamera = NCCamera(point: targetPoint, zoom: 75.0, rotation: 45.0, tilt: 30.0)
let callback = CameraCallbackImpl()
locationWindow.flyTo(camera: targetCamera, duration: 2000, callback: callback)
print("Started fly to animation to point (\‍(targetPoint.latitude), \‍(targetPoint.longitude))")

Objective C code snippet:

// Fly to position with smooth animation
NCGlobalPoint *targetPoint = [[NCGlobalPoint alloc] initWithLatitude:150.0 longitude:250.0];
NCCamera *targetCamera = [[NCCamera alloc] initWithPoint:targetPoint zoom:75.0 rotation:45.0 tilt:30.0];
CameraCallbackImpl *callback = [[CameraCallbackImpl alloc] init];
[_locationWindow flyToWithCamera:targetCamera duration:2000 callback:callback];
NSLog(@"Started fly to animation to point (%.2f, %.2f)", targetPoint.latitude, targetPoint.longitude);

◆ getAttribution

- (nonnull NSString *) getAttribution

OSM attribution text shown when the outdoor vector basemap is active. Fixed string required by the OpenStreetMap license / vector tile policy.

Swift code snippet:

let attribution = locationWindow.getAttribution()
print("Attribution: \‍(attribution)")

Objective C code snippet:

NSString *attribution = [_locationWindow getAttribution];
NSLog(@"Attribution: %@", attribution);

◆ getDebugFlag:

+ (BOOL) getDebugFlag: (NCDebugFlag) flag

Gets the state of a debug flag.

Parameters
flagThe debug flag to query DebugFlag.
Returns
true if the debug flag is enabled, false otherwise.

Swift code snippet:

let infosOn = NCLocationWindow.getDebugFlag(.infos)
print("Debug flag INFOS enabled: \‍(infosOn)")

Objective C code snippet:

BOOL infosOn = [NCLocationWindow getDebugFlag:NCDebugFlagInfos];
NSLog(@"Debug flag INFOS enabled: %@", infosOn ? @"YES" : @"NO");

◆ getEnclosingCamera:

- (nonnull NCCamera *) getEnclosingCamera: (nonnull NCBoundingBox *) boundingBox

Calculates camera that fits provided bounding box.

Parameters
boundingBoxWGS84 bounding box to enclose.

Swift code snippet:

let boundingBox = BoundingBox(
bottomLeft: GlobalPoint(latitude: 55.75, longitude: 37.61),
topRight: GlobalPoint(latitude: 55.76, longitude: 37.63))
let camera = locationWindow.getEnclosingCamera(boundingBox)
print("Camera that fits bounding box: \‍(camera)")

Objective C code snippet:

NCBoundingBox *boundingBox = [[NCBoundingBox alloc] initWithBottomLeft:[[NCGlobalPoint alloc] initWithLatitude:55.75 longitude:37.61]
topRight:[[NCGlobalPoint alloc] initWithLatitude:55.76 longitude:37.63]];
NCCamera *camera = [_locationWindow getEnclosingCamera:boundingBox];
NSLog(@"Camera that fits bounding box: %@", camera);

◆ getOperatingMode

- (NCOperatingMode) getOperatingMode

Returns the current operating mode OperatingMode.

Swift code snippet:

let currentMode = locationWindow.getOperatingMode()
print("Current operating mode: \‍(currentMode)")

Objective C code snippet:

NCOperatingMode currentMode = [_locationWindow getOperatingMode];
NSLog(@"Current operating mode: %ld", (long)currentMode);

◆ getSublocationId

- (nullable NSNumber *) getSublocationId

Returns current sublocation ID if set, otherwise null.

Swift code snippet:

if let currentId = locationWindow.getSublocationId() {
print("Current sublocation id: \‍(currentId)")
} else {
print("Current sublocation id is not set")
}

Objective C code snippet:

NSNumber *currentId = [_locationWindow getSublocationId];
if (currentId != nil) {
NSLog(@"Current sublocation id: %@", currentId);
} else {
NSLog(@"Current sublocation id is not set");
}

◆ globalToScreenPosition:clipToViewport:

- (CGPoint) globalToScreenPosition: (nonnull NCGlobalPoint *) point
clipToViewport: (BOOL) clipToViewport 

Converts WGS84 coordinates to screen coordinates (pixels).

Parameters
pointWGS84 coordinates GlobalPoint.
clipToViewportIf true, coordinates outside the viewport are clipped to the viewport edge.
Returns
(x,y) coordinates in screen pixels.

Swift code snippet:

let globalPoint2 = GlobalPoint(latitude: 55.7558, longitude: 37.6176)
let screenPoint2 = locationWindow.globalToScreenPosition(globalPoint2, clipToViewport: true)
print("WGS84 (\‍(globalPoint2.latitude), \‍(globalPoint2.longitude)) converted to screen with clipping: (\‍(screenPoint2.x), \‍(screenPoint2.y))")

Objective C code snippet:

NCGlobalPoint *globalPoint2 = [[NCGlobalPoint alloc] initWithLatitude:55.7558 longitude:37.6176];
NCScreenPoint *screenPoint2 = [_locationWindow globalToScreenPosition:globalPoint2 clipToViewport:YES];
NSLog(@"WGS84 (%.6f, %.6f) converted to screen with clipping: (%.1f, %.1f)",
globalPoint2.latitude, globalPoint2.longitude, screenPoint2.x, screenPoint2.y);

◆ moveTo:duration:animationType:callback:

- (void) moveTo: (nonnull NCCamera *) camera
duration: (int32_t) duration
animationType: (NCAnimationType) animationType
callback: (nullable NCCameraCallback) callback 

Moves the map camera to a new position with a smooth pan-and-zoom animation.

Parameters
cameraThe new camera position Camera.
durationAnimation duration in milliseconds (-1 for default duration).
animationTypeThe type of easing animation AnimationType.
callbackCallback to execute when the animation completes CameraCallback.

Swift code snippet:

// Move to position with linear animation
let targetPoint = NCGlobalPoint(latitude: 200.0, longitude: 300.0)
let targetCamera = NCCamera(point: targetPoint, zoom: 100.0, rotation: 90.0, tilt: 0.0)
let callback = CameraCallbackImpl()
locationWindow.moveTo(camera: targetCamera, duration: 1500, animationType: .linear, callback: callback)
print("Started move to with linear animation")

Objective C code snippet:

// Move to position with linear animation
NCGlobalPoint *targetPoint = [[NCGlobalPoint alloc] initWithLatitude:200.0 longitude:300.0];
NCCamera *targetCamera = [[NCCamera alloc] initWithPoint:targetPoint zoom:100.0 rotation:90.0 tilt:0.0];
CameraCallbackImpl *callback = [[CameraCallbackImpl alloc] init];
[_locationWindow moveToWithCamera:targetCamera duration:1500 animationType:NCAnimationTypeLinear callback:callback];
NSLog(@"Started move to with linear animation");

◆ pickMapFeatureAt:

- (void) pickMapFeatureAt: (CGPoint) point

Selects visible map features (e.g., venues) at the specified screen position.

Parameters
pointPosition in screen pixels to pick from. Results are delivered to the PickListener via onMapFeaturePickComplete PickListener.

Swift code snippet:

// Pick map feature at screen position
let featurePoint = NCPoint(x: 150.0, y: 250.0)
locationWindow.pickMapFeature(at: featurePoint)
print("Picked map feature at screen position (\‍(featurePoint.x), \‍(featurePoint.y))")

Objective C code snippet:

// Pick map feature at screen position
NCPoint *featurePoint = [[NCPoint alloc] initWithX:150.0 y:250.0];
[_locationWindow pickMapFeatureAt:featurePoint];
NSLog(@"Picked map feature at screen position (%.1f, %.1f)", featurePoint.x, featurePoint.y);

◆ pickMapObjectAt:

- (void) pickMapObjectAt: (CGPoint) point

Selects a visible, interactive map object at the specified screen position.

Parameters
pointPosition in screen pixels to pick from. Results are delivered to the PickListener via onMapObjectPickComplete PickListener.

Swift code snippet:

// Pick map object at screen position
let screenPoint = NCPoint(x: 100.0, y: 200.0)
locationWindow.pickMapObject(at: screenPoint)
print("Picked map object at screen position (\‍(screenPoint.x), \‍(screenPoint.y))")

Objective C code snippet:

// Pick map object at screen position
NCPoint *screenPoint = [[NCPoint alloc] initWithX:100.0 y:200.0];
[_locationWindow pickMapObjectAt:screenPoint];
NSLog(@"Picked map object at screen position (%.1f, %.1f)", screenPoint.x, screenPoint.y);

◆ removeAllMapObjects

- (void) removeAllMapObjects

Removes all map objects from the location view.

Swift code snippet:

// Remove all map objects
locationWindow.removeAllMapObjects()
print("Removed all map objects")

Objective C code snippet:

// Remove all map objects
[_locationWindow removeAllMapObjects];
[_mapObjects removeAllObjects];
NSLog(@"Removed all map objects");

◆ removeBuildingListener:

- (void) removeBuildingListener: (nullable id< NCBuildingListener >) listener

Removes previously added indoor building listener.

Parameters
listenerListener instance to remove BuildingListener.

Swift code snippet:

locationWindow.removeBuildingListener(listener)
print("Removed building listener")

Objective C code snippet:

[_locationWindow removeBuildingListener:_buildingListener];
NSLog(@"Removed building listener");

◆ removeCameraListener:

- (void) removeCameraListener: (nullable id< NCCameraListener >) listener

Removes a previously added CameraListener.

Parameters
listenerThe CameraListener instance to remove CameraListener.

Swift code snippet:

// Remove camera listener
locationWindow.removeCameraListener(cameraListener!)
cameraListener = nil
print("Removed camera listener")

Objective C code snippet:

// Remove camera listener
[_locationWindow removeCameraListener:_cameraListener];
NSLog(@"Removed camera listener");

◆ removeCircleMapObject:

- (BOOL) removeCircleMapObject: (nullable NCCircleMapObject *) circleMapObject

Removes a circle map object from the location view.

Parameters
circleMapObjectThe circle map object instance CircleMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Remove circle map object
if let circleMapObject = circleMapObject {
let removed = locationWindow.removeCircleMapObject(circleMapObject)
print("Removed circle map object: \‍(removed)")
self.circleMapObject = nil
}

Objective C code snippet:

// Remove circle map object
[_locationWindow removeCircleMapObject:circleObject];
[_mapObjects removeObject:circleObject];
NSLog(@"Removed circle map object");

◆ removeClusterMapObjectController:

- (BOOL) removeClusterMapObjectController: (nullable NCClusterMapObjectController *) controller

Removes an icon map object controller from the location view.

Parameters
controllerThe controller instance to remove.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

let controllerRemoved = locationWindow.removeClusterMapObjectController(controller)
print("Removed cluster map object controller: \‍(controllerRemoved)")

Objective C code snippet:

BOOL controllerRemoved =
[_locationWindow removeClusterMapObjectController:controller];
NSLog(@"Removed cluster map object controller: %d", controllerRemoved);

◆ removeDottedPolylineMapObject:

- (BOOL) removeDottedPolylineMapObject: (nullable NCDottedPolylineMapObject *) dottedPolylineMapObject

Removes a polyline points map object from the location view.

Parameters
dottedPolylineMapObjectThe polyline points map object instance DottedPolylineMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Remove dotted polyline map object
if let dottedPolylineMapObject = dottedPolylineMapObject {
let removed = locationWindow.removeDottedPolylineMapObject(dottedPolylineMapObject)
print("Removed dotted polyline map object: \‍(removed)")
self.dottedPolylineMapObject = nil
}

Objective C code snippet:

// Remove dotted polyline map object
[_locationWindow removeDottedPolylineMapObject:dottedPolylineObject];
[_mapObjects removeObject:dottedPolylineObject];
NSLog(@"Removed dotted polyline map object");

◆ removeIconMapObject:

- (BOOL) removeIconMapObject: (nullable NCIconMapObject *) iconMapObject

Removes an icon map object from the location view.

Parameters
iconMapObjectThe icon map object instance IconMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Remove icon map object
if let iconMapObject = iconMapObject {
let removed = locationWindow.removeIconMapObject(iconMapObject)
print("Removed icon map object: \‍(removed)")
self.iconMapObject = nil
}

Objective C code snippet:

// Remove icon map object
[_locationWindow removeIconMapObject:iconObject];
[_mapObjects removeObject:iconObject];
NSLog(@"Removed icon map object");

◆ removeInputListener:

- (void) removeInputListener: (nullable id< NCInputListener >) listener

Removes a previously added InputListener.

Parameters
listenerThe InputListener instance to remove InputListener.

Swift code snippet:

// Remove input listener
locationWindow.removeInputListener(inputListener!)
inputListener = nil
print("Removed input listener")

Objective C code snippet:

// Remove input listener
[_locationWindow removeInputListener:_inputListener];
NSLog(@"Removed input listener");

◆ removeModelMapObject:

- (BOOL) removeModelMapObject: (nullable NCModelMapObject *) modelMapObject

Removes a model map object from the location view.

Parameters
modelMapObjectThe model instance to remove ModelMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

let removed = locationWindow.removeModelMapObject(m)
print("Removed model map object: \‍(removed)")
modelMapObject = nil

Objective C code snippet:

BOOL removed = [_locationWindow removeModelMapObject:modelObject];
NSLog(@"Removed model map object: %@", removed ? @"YES" : @"NO");

◆ removePickListener:

- (void) removePickListener: (nullable id< NCPickListener >) listener

Removes a previously added PickListener.

Parameters
listenerThe PickListener instance to remove PickListener.

Swift code snippet:

locationWindow.removePickListener(listener)
print("Removed pick listener \‍(i)")

Objective C code snippet:

[_locationWindow removePickListener:listeners[i]];
NSLog(@"Removed pick listener %d", i);

◆ removePolygonMapObject:

- (BOOL) removePolygonMapObject: (nullable NCPolygonMapObject *) polygonMapObject

Removes a polygon map object from the location view.

Parameters
polygonMapObjectThe polygon map object instance PolygonMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Remove polygon map object
if let polygonMapObject = polygonMapObject {
let removed = locationWindow.removePolygonMapObject(polygonMapObject)
print("Removed polygon map object: \‍(removed)")
self.polygonMapObject = nil
}

Objective C code snippet:

// Remove polygon map object
if (polygonObject != nil) {
BOOL removed = [_locationWindow removePolygonMapObject:polygonObject];
NSLog(@"Removed polygon map object: %@", removed ? @"YES" : @"NO");
}

◆ removePolylineMapObject:

- (BOOL) removePolylineMapObject: (nullable NCPolylineMapObject *) polylineMapObject

Removes a polyline map object from the location view.

Parameters
polylineMapObjectThe polyline map object instance PolylineMapObject.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Remove polyline map object
if let polylineMapObject = polylineMapObject {
let removed = locationWindow.removePolylineMapObject(polylineMapObject)
print("Removed polyline map object: \‍(removed)")
self.polylineMapObject = nil
}

Objective C code snippet:

// Remove polyline map object
[_locationWindow removePolylineMapObject:polylineObject];
[_mapObjects removeObject:polylineObject];
NSLog(@"Removed polyline map object");

◆ removeSublocationChangeListener:

- (void) removeSublocationChangeListener: (nullable id< NCSublocationChangeListener >) listener

Removes previously added sublocation change listener.

Parameters
listenerListener instance to remove SublocationChangeListener.

Swift code snippet:

locationWindow.removeSublocationChangeListener(listener)
print("Removed sublocation change listener")

Objective C code snippet:

[_locationWindow removeSublocationChangeListener:listener];
NSLog(@"Removed sublocation change listener");

◆ screenPositionToGlobal:

- (nonnull NCGlobalPoint *) screenPositionToGlobal: (CGPoint) point

Converts screen coordinates (pixels) to WGS84 coordinates.

Parameters
point(x,y) coordinates in screen pixels.
Returns
WGS84 coordinates GlobalPoint.

Swift code snippet:

let screenPoint = ScreenPoint(x: 100.0, y: 200.0)
let globalPoint = locationWindow.screenPositionToGlobal(screenPoint)
print("Screen position (\‍(screenPoint.x), \‍(screenPoint.y)) converted to WGS84: (\‍(globalPoint.latitude), \‍(globalPoint.longitude))")

Objective C code snippet:

NCScreenPoint *screenPoint = [[NCScreenPoint alloc] initWithX:100.0 y:200.0];
NCGlobalPoint *globalPoint = [_locationWindow screenPositionToGlobal:screenPoint];
NSLog(@"Screen position (%.1f, %.1f) converted to WGS84: (%.6f, %.6f)",
screenPoint.x, screenPoint.y, globalPoint.latitude, globalPoint.longitude);

◆ selectMapFeature:

- (BOOL) selectMapFeature: (nonnull NSString *) featureId

Selects a map feature by its feature ID.

Parameters
featureIdThe feature ID from the mapFeaturePickResult PickListener.
Returns
true if the operation is successful, false otherwise.

Swift code snippet:

// Select map feature by ID
let featureId = "room_101"
let selected = locationWindow.selectMapFeature(featureId)
print("Selected map feature \‍(featureId): \‍(selected)")

Objective C code snippet:

// Select map feature by ID
NSString *featureId = "room_101";
BOOL selected = [_locationWindow selectMapFeature:featureId];
NSLog(@"Selected map feature %@: %@", featureId, selected ? @"YES" : @"NO");

◆ setDebugFlag:on:

+ (void) setDebugFlag: (NCDebugFlag) flag
on: (BOOL) on 

Sets the state of a debug flag.

Parameters
flagThe debug flag to set DebugFlag.
onSpecifies whether the debug flag is enabled (true) or disabled (false).

Swift code snippet:

NCLocationWindow.setDebugFlag(.infos, on: true)
NCLocationWindow.setDebugFlag(.stats, on: false)
print("Updated debug flags on LocationWindow")

Objective C code snippet:

[NCLocationWindow setDebugFlag:NCDebugFlagInfos on:YES];
[NCLocationWindow setDebugFlag:NCDebugFlagStats on:NO];
NSLog(@"Updated debug flags on LocationWindow");

◆ setOperatingMode:

- (void) setOperatingMode: (NCOperatingMode) mode

Sets the operating mode of the location view OperatingMode. Default: indoor_only.

Swift code snippet:

locationWindow.setOperatingMode(.outdoorIndoor)
print("Set operating mode to outdoorIndoor")

Objective C code snippet:

[_locationWindow setOperatingMode:NCOperatingModeOutdoorIndoor];
NSLog(@"Set operating mode to OUTDOOR_INDOOR");

◆ setSublocationId:

- (void) setSublocationId: (int32_t) id

Method is used to switch the location view between sublocations (e.g., floors).

Parameters
idSublocation unique identifier Sublocation.

Swift code snippet:

// Set sublocation ID to switch between floors
locationWindow.setSublocationId(1)
print("Set sublocation ID to 1 (first floor)")

Objective C code snippet:

// Set sublocation ID to switch between floors
[_locationWindow setSublocationId:1];
NSLog(@"Set sublocation ID to 1 (first floor)");

Property Documentation

◆ attributionAlignment

- (NCAttributionAlignment*) attributionAlignment
readwritenonatomicassign

Screen placement of the OSM attribution overlay AttributionAlignment. Default: right + bottom. Visible only in outdoor / outdoor_indoor modes.

Swift code snippet:

locationWindow.setAttributionAlignment(alignment)

Objective C code snippet:

[_locationWindow setAttributionAlignment:alignment];

Definition at line 774 of file NCLocationWindow.h.

◆ camera

- (NCCamera*) camera
readwritenonatomicassign

Current camera position (look-at in WGS84). Camera.

Swift code snippet:

// Set camera position without animation
locationWindow.camera = newCamera
print("Set camera position to (\‍(newPoint.latitude), \‍(newPoint.longitude)) with zoom 50.0, rotation 0°, tilt 0°")

Objective C code snippet:

// Set camera position without animation
_locationWindow.camera = newCamera;
NSLog(@"Set camera position to (%.2f, %.2f) with zoom 50.0, rotation 0°, tilt 0°", newPoint.latitude, newPoint.longitude);

Definition at line 852 of file NCLocationWindow.h.

◆ maxZoomFactor

- (float) maxZoomFactor
readwritenonatomicassign

Maximum zoom level for the location view (pixels per meter).

Swift code snippet:

// Set maximum zoom factor
locationWindow.maxZoomFactor = 300.0
print("Set maximum zoom factor to 300.0")

Objective C code snippet:

// Set maximum zoom factor
[_locationWindow setMaxZoomFactor:300.0];
NSLog(@"Set maximum zoom factor to 300.0");

Definition at line 820 of file NCLocationWindow.h.

◆ minZoomFactor

- (float) minZoomFactor
readwritenonatomicassign

Minimum zoom level for the location view (pixels per meter).

Swift code snippet:

// Set minimum zoom factor
locationWindow.minZoomFactor = 50.0
print("Set minimum zoom factor to 50.0")

Objective C code snippet:

// Set minimum zoom factor
[_locationWindow setMinZoomFactor:50.0];
NSLog(@"Set minimum zoom factor to 50.0");

Definition at line 805 of file NCLocationWindow.h.

◆ pickRadius

- (float) pickRadius
readwritenonatomicassign

Extra slop around the hit target, in density-independent pixels. Applied as a screen-pixel radius for points/lines and as a margin around a label's real AABB. Default: 5 dp.

Swift code snippet:

// Set pick radius
locationWindow.pickRadius = 10.0
print("Set pick radius to 10.0 pixels")

Objective C code snippet:

// Set pick radius
_locationWindow.pickRadius = 10.0;
NSLog(@"Set pick radius to 10.0 pixels");

Definition at line 929 of file NCLocationWindow.h.

◆ rotateGestureEnabled

- (BOOL) rotateGestureEnabled
readwritenonatomicassign

Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.

Swift code snippet:

// Set rotate gesture enabled
locationWindow.rotateGestureEnabled = true
print("Set rotate gesture enabled to true")

Objective C code snippet:

// Set rotate gesture enabled
_locationWindow.rotateGestureEnabled = YES;
NSLog(@"Set rotate gesture enabled to true");

Definition at line 867 of file NCLocationWindow.h.

◆ scrollGesturesEnabled

- (BOOL) scrollGesturesEnabled
readwritenonatomicassign

Specifies whether scroll gestures (e.g., pan gesture) are enabled.

Swift code snippet:

// Set scroll gestures enabled
locationWindow.scrollGesturesEnabled = true
print("Set scroll gestures enabled to true")

Objective C code snippet:

// Set scroll gestures enabled
_locationWindow.scrollGesturesEnabled = YES;
NSLog(@"Set scroll gestures enabled to true");

Definition at line 897 of file NCLocationWindow.h.

◆ selectedMapFeatures

- (NSArray<NSString *>*) selectedMapFeatures
readnonatomicassign

List of currently selected map feature IDs.

Swift code snippet:

// Get list of selected map features
let selectedFeatures = locationWindow.selectedMapFeatures
print("Currently selected map features: \‍(selectedFeatures.count) features")
for feature in selectedFeatures {
print(" - \‍(feature)")
}

Objective C code snippet:

// Get list of selected map features
NSArray<NSString *> *selectedFeatures = [_locationWindow selectedMapFeatures];
NSLog(@"Currently selected map features: %lu features", (unsigned long)selectedFeatures.count);
for (NSString *feature in selectedFeatures) {
NSLog(@" - %@", feature);
}

Definition at line 944 of file NCLocationWindow.h.

◆ stickToBorder

- (BOOL) stickToBorder
readwritenonatomicassign

Specifies whether sublocation content sticks to screen borders.

If true, content sticks to screen bounds; if false, content is centered. Default: true.

Swift code snippet:

// Set stick to border property
locationWindow.stickToBorder = true
print("Set stick to border to true")

Objective C code snippet:

// Set stick to border property
_locationWindow.stickToBorder = YES;
NSLog(@"Set stick to border to true");

Definition at line 836 of file NCLocationWindow.h.

◆ tiltGesturesEnabled

- (BOOL) tiltGesturesEnabled
readwritenonatomicassign

Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.

Swift code snippet:

// Set tilt gestures enabled
locationWindow.tiltGesturesEnabled = true
print("Set tilt gestures enabled to true")

Objective C code snippet:

// Set tilt gestures enabled
_locationWindow.tiltGesturesEnabled = YES;
NSLog(@"Set tilt gestures enabled to true");

Definition at line 882 of file NCLocationWindow.h.

◆ valid

- (BOOL) valid
readnonatomicassign

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 952 of file NCLocationWindow.h.

◆ zoomFactor

- (float) zoomFactor
readwritenonatomicassign

Specifies the zoom level of the location view, in pixels per meter. Default: approximately 100 meters across the screen width.

Swift code snippet:

// Set zoom factor
locationWindow.zoomFactor = 150.0
print("Set zoom factor to 150.0")

Objective C code snippet:

// Set zoom factor
[_locationWindow setZoomFactor:150.0];
NSLog(@"Set zoom factor to 150.0");

Definition at line 790 of file NCLocationWindow.h.

◆ zoomGesturesEnabled

- (BOOL) zoomGesturesEnabled
readwritenonatomicassign

Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.

Swift code snippet:

// Set zoom gestures enabled
locationWindow.zoomGesturesEnabled = true
print("Set zoom gestures enabled to true")

Objective C code snippet:

// Set zoom gestures enabled
_locationWindow.zoomGesturesEnabled = YES;
NSLog(@"Set zoom gestures enabled to true");

Definition at line 912 of file NCLocationWindow.h.


The documentation for this class was generated from the following file: