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 |
Attribution text for the outdoor tiles. Comes from tileProvider.attribution when set. A null vector source uses the OSM default. | |
| (nonnull NCCamera *) | - getEnclosingCamera: |
Camera that fits boundingBox into the current focus rect. Uses focusRect when set, otherwise the full viewport. Keeps the current azimuth and tilt (tilt fit is approximate). | |
| (nonnull NCCamera *) | - getEnclosingCameraWithFocus:focusRect:azimuth:tilt: |
Camera that fits boundingBox, with optional overrides. Null focusRect / azimuth / tilt keep the current window values (focusRect property, current camera). Azimuth and tilt are degrees, same units as Camera. | |
| (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. | |
| (nullable NCGeoJsonImport *) | - addGeoJson:sublocationId: |
Adds polygons and lines from one GeoJSON document on a floor. Accepts a FeatureCollection, a Feature, or one geometry, the same inputs as a GeoJSON source. Polygon holes become LocationPolygon.innerRings. Points are skipped. Returns null when the document is not JSON. The host styles the returned objects. | |
| (nullable NCPointBatch *) | - addPointBatch |
| Creates one arrow cloud. Replace its points each frame. | |
| (BOOL) | - removePointBatch: |
| Removes an arrow cloud. | |
| (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 a smooth pan-and-zoom (fly) animation. | |
| (void) | - moveTo:duration:animationType:callback: |
| Moves the map camera to a new position with an easing 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 | |
| NCMapTheme | mapTheme |
| Outdoor vector basemap color theme MapTheme. Indoor rasters, venues, and user map objects are unchanged. Default: light. | |
| NCTileProvider * | tileProvider |
Outdoor tile source TileProvider. kind vector draws MVT (schema must match the tiles). kind raster draws PNG, JPEG, or WebP imagery and hides outdoor vector geometry and labels. schema is ignored for raster. Indoor floors stay on top. Null (default) uses OSM Shortbread at vector.openstreetmap.org. When mbtiles is set, tiles are read only from that file. | |
| NCAttributionAlignment * | attributionAlignment |
| 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. | |
| NCCamera * | camera |
| Current camera position (look-at in WGS84). Camera. | |
| NCScreenRect * | focusRect |
Area of the viewport used when fitting a bounding box. Null (default) is the full view. Set this for a floor selector, follow-me button, or POI card so getEnclosingCamera keeps geometry in the remaining rectangle. Coordinates are screen pixels ScreenRect. | |
| NCVisibleRegion * | focusRegion |
Four corners of focusRect in WGS84, or visibleRegion when focusRect is null VisibleRegion. | |
| NCVisibleRegion * | visibleRegion |
Four corners of the current viewport in WGS84 VisibleRegion. Corners are ray-cast onto the ground plane, same as screenPositionToGlobal. With tilt the shape is a trapezoid. | |
| 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 |
Interface for interacting with the location view.
Referenced from LocationView.
Definition at line 47 of file NCLocationWindow.h.
| - (void) addBuildingListener: | (nullable id< NCBuildingListener >) | listener |
Adds listener for outdoor scenario: when camera focuses on a building or leaves it.
| listener | Indoor building listener BuildingListener. |
Swift code snippet:
Objective C code snippet:
| - (void) addCameraListener: | (nullable id< NCCameraListener >) | listener |
Adds a CameraListener to receive camera movement events.
| listener | The CameraListener instance CameraListener. |
Swift code snippet:
Objective C code snippet:
| - (nullable NCCircleMapObject *) addCircleMapObject |
Creates and adds a circle map object to the location view.
Swift code snippet:
Objective C code snippet:
| - (nullable NCClusterMapObjectController *) addClusterMapObjectController |
Creates an icon map object controller for the location view.
Swift code snippet:
Objective C code snippet:
| - (nullable NCDottedPolylineMapObject *) addDottedPolylineMapObject |
Creates and adds a polyline points map object to the location view.
Swift code snippet:
Objective C code snippet:
| - (nullable NCGeoJsonImport *) addGeoJson: | (nonnull NSString *) | geoJson | |
| sublocationId: | (nullable NSNumber *) | sublocationId |
Adds polygons and lines from one GeoJSON document on a floor. Accepts a FeatureCollection, a Feature, or one geometry, the same inputs as a GeoJSON source. Polygon holes become LocationPolygon.innerRings. Points are skipped. Returns null when the document is not JSON. The host styles the returned objects.
| geoJson | GeoJSON text. |
| sublocationId | Floor for every object, or null for the outdoor map. |
Swift code snippet:
Objective C code snippet:
| - (nullable NCIconMapObject *) addIconMapObject |
Creates and adds an icon map object to the location view.
Swift code snippet:
Objective C code snippet:
| - (void) addInputListener: | (nullable id< NCInputListener >) | listener |
Adds an InputListener to receive input events.
| listener | The InputListener instance InputListener. |
Swift code snippet:
Objective C code snippet:
| - (nullable NCModelMapObject *) addModelMapObject |
Creates and adds a 3D model map object (Wavefront OBJ + texture via ModelProvider).
Swift code snippet:
Objective C code snippet:
| - (void) addPickListener: | (nullable id< NCPickListener >) | listener |
Adds a PickListener to receive picking result events.
| listener | The PickListener instance PickListener. |
Swift code snippet:
Objective C code snippet:
| - (nullable NCPointBatch *) addPointBatch |
Creates one arrow cloud. Replace its points each frame.
Swift code snippet:
Objective C code snippet:
| - (nullable NCPolygonMapObject *) addPolygonMapObject |
Creates and adds a polygon map object to the location view.
Swift code snippet:
Objective C code snippet:
| - (nullable NCPolylineMapObject *) addPolylineMapObject |
Creates and adds a polyline map object to the location view.
Swift code snippet:
Objective C code snippet:
| - (void) addSublocationChangeListener: | (nullable id< NCSublocationChangeListener >) | listener |
Adds listener for sublocation change events.
| listener | Sublocation change listener SublocationChangeListener. |
Swift code snippet:
Objective C code snippet:
| - (void) applyLayerFilter: | (nonnull NSString *) | layer | |
| conditions: | (nonnull NSArray< NCMapFilterCondition * > *) | conditions |
Applies a typed filter to a specific map layer.
| layer | The map layer to apply the filter to. |
| conditions | List of conditions (property + allowed values). Empty list resets the filter (show all). |
Swift code snippet:
Objective C code snippet:
| - (void) deselectAllMapFeatures |
Deselects all currently selected map features.
Swift code snippet:
Objective C code snippet:
| - (BOOL) deselectMapFeature: | (nonnull NSString *) | featureId |
Deselects a map feature by its feature ID.
| featureId | The feature ID from the mapFeaturePickResult PickListener. |
Swift code snippet:
Objective C code snippet:
| - (void) flyTo: | (nonnull NCCamera *) | camera | |
| duration: | (int32_t) | duration | |
| callback: | (nullable NCCameraCallback) | callback |
Moves the map camera to a new position with a smooth pan-and-zoom (fly) animation.
| camera | The new camera position Camera. |
| duration | Animation duration in milliseconds (-1 derives it from the distance). |
| callback | Callback to execute when the animation completes CameraCallback. |
Swift code snippet:
Objective C code snippet:
| - (nonnull NSString *) getAttribution |
Attribution text for the outdoor tiles. Comes from tileProvider.attribution when set. A null vector source uses the OSM default.
Swift code snippet:
Objective C code snippet:
| + (BOOL) getDebugFlag: | (NCDebugFlag) | flag |
Gets the state of a debug flag.
| flag | The debug flag to query DebugFlag. |
Swift code snippet:
Objective C code snippet:
| - (nonnull NCCamera *) getEnclosingCamera: | (nonnull NCBoundingBox *) | boundingBox |
Camera that fits boundingBox into the current focus rect. Uses focusRect when set, otherwise the full viewport. Keeps the current azimuth and tilt (tilt fit is approximate).
| boundingBox | WGS84 bounding box to enclose. |
Swift code snippet:
Objective C code snippet:
| - (nonnull NCCamera *) getEnclosingCameraWithFocus: | (nonnull NCBoundingBox *) | boundingBox | |
| focusRect: | (nullable NCScreenRect *) | focusRect | |
| azimuth: | (nullable NSNumber *) | azimuth | |
| tilt: | (nullable NSNumber *) | tilt |
Camera that fits boundingBox, with optional overrides. Null focusRect / azimuth / tilt keep the current window values (focusRect property, current camera). Azimuth and tilt are degrees, same units as Camera.
Swift code snippet:
Objective C code snippet:
| - (NCOperatingMode) getOperatingMode |
Returns the current operating mode OperatingMode.
Swift code snippet:
Objective C code snippet:
| - (nullable NSNumber *) getSublocationId |
Returns current sublocation ID if set, otherwise null.
Swift code snippet:
Objective C code snippet:
| - (CGPoint) globalToScreenPosition: | (nonnull NCGlobalPoint *) | point | |
| clipToViewport: | (BOOL) | clipToViewport |
Converts WGS84 coordinates to screen coordinates (pixels).
| point | WGS84 coordinates GlobalPoint. |
| clipToViewport | If true, coordinates outside the viewport are clipped to the viewport edge. |
Swift code snippet:
Objective C code snippet:
| - (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 an easing animation.
| camera | The new camera position Camera. |
| duration | Animation duration in milliseconds (-1 for default duration). |
| animationType | The type of easing animation AnimationType. |
| callback | Callback to execute when the animation completes CameraCallback. |
Swift code snippet:
Objective C code snippet:
| - (void) pickMapFeatureAt: | (CGPoint) | point |
Selects visible map features (e.g., venues) at the specified screen position.
| point | Position in screen pixels to pick from. Results are delivered to the PickListener via onMapFeaturePickComplete PickListener. |
Swift code snippet:
Objective C code snippet:
| - (void) pickMapObjectAt: | (CGPoint) | point |
Selects a visible, interactive map object at the specified screen position.
| point | Position in screen pixels to pick from. Results are delivered to the PickListener via onMapObjectPickComplete PickListener. |
Swift code snippet:
Objective C code snippet:
| - (void) removeAllMapObjects |
Removes all map objects from the location view.
Swift code snippet:
Objective C code snippet:
| - (void) removeBuildingListener: | (nullable id< NCBuildingListener >) | listener |
Removes previously added indoor building listener.
| listener | Listener instance to remove BuildingListener. |
Swift code snippet:
Objective C code snippet:
| - (void) removeCameraListener: | (nullable id< NCCameraListener >) | listener |
Removes a previously added CameraListener.
| listener | The CameraListener instance to remove CameraListener. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeCircleMapObject: | (nullable NCCircleMapObject *) | circleMapObject |
Removes a circle map object from the location view.
| circleMapObject | The circle map object instance CircleMapObject. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeClusterMapObjectController: | (nullable NCClusterMapObjectController *) | controller |
Removes an icon map object controller from the location view.
| controller | The controller instance to remove. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeDottedPolylineMapObject: | (nullable NCDottedPolylineMapObject *) | dottedPolylineMapObject |
Removes a polyline points map object from the location view.
| dottedPolylineMapObject | The polyline points map object instance DottedPolylineMapObject. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeIconMapObject: | (nullable NCIconMapObject *) | iconMapObject |
Removes an icon map object from the location view.
| iconMapObject | The icon map object instance IconMapObject. |
Swift code snippet:
Objective C code snippet:
| - (void) removeInputListener: | (nullable id< NCInputListener >) | listener |
Removes a previously added InputListener.
| listener | The InputListener instance to remove InputListener. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removeModelMapObject: | (nullable NCModelMapObject *) | modelMapObject |
Removes a model map object from the location view.
| modelMapObject | The model instance to remove ModelMapObject. |
Swift code snippet:
Objective C code snippet:
| - (void) removePickListener: | (nullable id< NCPickListener >) | listener |
Removes a previously added PickListener.
| listener | The PickListener instance to remove PickListener. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removePointBatch: | (nullable NCPointBatch *) | pointBatch |
Removes an arrow cloud.
| - (BOOL) removePolygonMapObject: | (nullable NCPolygonMapObject *) | polygonMapObject |
Removes a polygon map object from the location view.
| polygonMapObject | The polygon map object instance PolygonMapObject. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) removePolylineMapObject: | (nullable NCPolylineMapObject *) | polylineMapObject |
Removes a polyline map object from the location view.
| polylineMapObject | The polyline map object instance PolylineMapObject. |
Swift code snippet:
Objective C code snippet:
| - (void) removeSublocationChangeListener: | (nullable id< NCSublocationChangeListener >) | listener |
Removes previously added sublocation change listener.
| listener | Listener instance to remove SublocationChangeListener. |
Swift code snippet:
Objective C code snippet:
| - (nonnull NCGlobalPoint *) screenPositionToGlobal: | (CGPoint) | point |
Converts screen coordinates (pixels) to WGS84 coordinates.
| point | (x,y) coordinates in screen pixels. |
Swift code snippet:
Objective C code snippet:
| - (BOOL) selectMapFeature: | (nonnull NSString *) | featureId |
Selects a map feature by its feature ID.
| featureId | The feature ID from the mapFeaturePickResult PickListener. |
Swift code snippet:
Objective C code snippet:
| + (void) setDebugFlag: | (NCDebugFlag) | flag | |
| on: | (BOOL) | on |
Sets the state of a debug flag.
| flag | The debug flag to set DebugFlag. |
| on | Specifies whether the debug flag is enabled (true) or disabled (false). |
Swift code snippet:
Objective C code snippet:
| - (void) setOperatingMode: | (NCOperatingMode) | mode |
Sets the operating mode of the location view OperatingMode. Default: indoor_only.
Swift code snippet:
Objective C code snippet:
| - (void) setSublocationId: | (int32_t) | id |
Method is used to switch the location view between sublocations (e.g., floors).
| id | Sublocation unique identifier Sublocation. |
Swift code snippet:
Objective C code snippet:
|
readwritenonatomicassign |
Screen placement of the OSM attribution overlay AttributionAlignment. Default: right + bottom. Visible only in outdoor / outdoor_indoor modes.
Swift code snippet:
Objective C code snippet:
Definition at line 885 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Current camera position (look-at in WGS84). Camera.
Swift code snippet:
Objective C code snippet:
Definition at line 963 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Area of the viewport used when fitting a bounding box. Null (default) is the full view. Set this for a floor selector, follow-me button, or POI card so getEnclosingCamera keeps geometry in the remaining rectangle. Coordinates are screen pixels ScreenRect.
Swift code snippet:
Objective C code snippet:
Definition at line 981 of file NCLocationWindow.h.
|
readnonatomicassign |
Four corners of focusRect in WGS84, or visibleRegion when focusRect is null VisibleRegion.
Swift code snippet:
Objective C code snippet:
Definition at line 997 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Outdoor vector basemap color theme MapTheme. Indoor rasters, venues, and user map objects are unchanged. Default: light.
Swift code snippet:
Objective C code snippet:
Definition at line 848 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Maximum zoom level for the location view (pixels per meter).
Swift code snippet:
Objective C code snippet:
Definition at line 931 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Minimum zoom level for the location view (pixels per meter).
Swift code snippet:
Objective C code snippet:
Definition at line 916 of file NCLocationWindow.h.
|
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:
Objective C code snippet:
Definition at line 1092 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Specifies whether rotation gestures (e.g., two-finger rotation) are enabled.
Swift code snippet:
Objective C code snippet:
Definition at line 1030 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Specifies whether scroll gestures (e.g., pan gesture) are enabled.
Swift code snippet:
Objective C code snippet:
Definition at line 1060 of file NCLocationWindow.h.
|
readnonatomicassign |
List of currently selected map feature IDs.
Swift code snippet:
Objective C code snippet:
Definition at line 1107 of file NCLocationWindow.h.
|
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:
Objective C code snippet:
Definition at line 947 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Outdoor tile source TileProvider. kind vector draws MVT (schema must match the tiles). kind raster draws PNG, JPEG, or WebP imagery and hides outdoor vector geometry and labels. schema is ignored for raster. Indoor floors stay on top. Null (default) uses OSM Shortbread at vector.openstreetmap.org. When mbtiles is set, tiles are read only from that file.
Swift code snippet:
Objective C code snippet:
Definition at line 869 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Specifies whether tilt gestures (e.g., two-finger parallel pan) are enabled.
Swift code snippet:
Objective C code snippet:
Definition at line 1045 of file NCLocationWindow.h.
|
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 1115 of file NCLocationWindow.h.
|
readnonatomicassign |
Four corners of the current viewport in WGS84 VisibleRegion. Corners are ray-cast onto the ground plane, same as screenPositionToGlobal. With tilt the shape is a trapezoid.
Swift code snippet:
Objective C code snippet:
Definition at line 1015 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Specifies the zoom level of the location view, in pixels per meter. Default: approximately 100 meters across the screen width.
Swift code snippet:
Objective C code snippet:
Definition at line 901 of file NCLocationWindow.h.
|
readwritenonatomicassign |
Specifies whether zoom gestures (e.g., two-finger pinch) are enabled.
Swift code snippet:
Objective C code snippet:
Definition at line 1075 of file NCLocationWindow.h.