Class NCLocationView - Navigine/Indoor-Navigation-iOS-Mobile-SDK-2.0 GitHub Wiki

NCLocationView class is used for showing the map and its elements on the device screen.

@interface NCLocationView : UIView

- (instancetype)initWithFrame:(CGRect)frame;

- (void) setSublocationId: (int) sublocationId;

- (NCCircleMapObject *) addCircleMapObject;

- (bool) removeCircleMapObject: (NCCircleMapObject *) circleMapObject;

- (NCIconMapObject *) addIconMapObject;

- (bool) removeIconMapObject: (NCIconMapObject *) iconMapObject;

- (NCPolylineMapObject *) addPolylineMapObject;

- (bool) removePolylineMapObject: (NCPolylineMapObject *) polylineMapObject;

- (void) requestRender;

@property (assign, nonatomic) CGFloat minZoomFactor;

@property (assign, nonatomic) CGFloat maxZoomFactor;

@property (assign, nonatomic) CGFloat zoomFactor;

@property (weak, nonatomic, nullable) id<NCPickListener> pickListener;

@end

Public fields

Public methods

Function setSublocation

- (void) setSublocationId: (int) sublocationId;

Function sets the sublocation for current downloaded and set location.

Parameters
  • sublocationId — id of the sublocation.

Functions addCircleMapObject / removeCircleMapObject

- (NCCircleMapObject *) addCircleMapObject;

Function is used for creating circle map object on location view and getting it.

Return value

NCCircleMapObject class element.

- (bool) removeCircleMapObject: (NCCircleMapObject *) circleMapObject;

Function is used for removing circle map object from location view

Parameters
Return value
  • true - if deletion was successful
  • false - if smth was wrong

Functions addIconMapObject / removeIconMapObject

- (NCIconMapObject *) addIconMapObject;

Function is used for creating icon map object on location view and getting it.

Return value

NCIconMapObject class element.

- (bool) removeIconMapObject: (NCIconMapObject *) iconMapObject;

Function is used for removing icon map object from location view

Parameters
Return value
  • true - if deletion was successful
  • false - if smth was wrong

Functions addPolylineMapObject / removePolylineMapObject

- (NCPolylineMapObject *) addPolylineMapObject;

Function is used for creating polyline map object on location view and getting it.

Return value

NCPolylineMapObject class element.

- (bool) removePolylineMapObject: (NCPolylineMapObject *) polylineMapObject;

Function is used for removing polyline map object from location view

Parameters
Return value
  • true - if deletion was successful
  • false - if smth was wrong

Function getZoomFactor / setZoomFactor

ZoomFactor — pixels per meter parameter how to scale location view

- (float) getZoomFactor;

Function is used for getting current zoom factor of location view

Return value

float - current zoom factor

- (void) setZoomFactor: (float) zoomFactor;

Set zoom factor of the location view

Parameters
  • zoomFactor — pixels per meter value

Functions pickMapObjectAt

- (void)pickMapObjectAt:(CGPoint)viewPosition;

Function is used for picking map object on location view. Results will be returned in a callback to the object set by pickListener

Parameters
  • viewPosition — position in the view to pick from, in logical pixels.