NSDK_UIMapView
@interface NSDK_UIMapView : GLKView <UIGestureRecognizerDelegate>
This is the class for rendering maps and showing them on the screen.
@author PTV AG Karlsruhe
-
Undocumented
Declaration
Objective-C
- (void)refresh;
Swift
func refresh()
-
Sets the center position of the MapView.
Declaration
Objective-C
- (void)setCenterWithPosition:(NSDK_Position *)position;
Swift
func setCenterWith(_ position: NSDK_Position!)
Parameters
position
the center position of the MapView (Mercator)
-
Sets the center position of the MapView.
Declaration
Objective-C
- (void)setCenterWithGeoPosition:(NSDK_GeoPosition *)geoposition;
Swift
func setCenterWith(_ geoposition: NSDK_GeoPosition!)
Parameters
geoposition
the center position of the MapView
-
Position a marker indicating the current position on the map.
Declaration
Objective-C
- (void)setMapMarkerWithCenter:(NSDK_Position *)mapMarkerCenter orientation:(int)orientation northernAdjust:(BOOL)northernAdjust style:(NSDK_MapMarkerStyle)mapMarkerStyle;
Swift
func setMapMarkerWithCenter(_ mapMarkerCenter: NSDK_Position!, orientation: Int32, northernAdjust: Bool, style mapMarkerStyle: NSDK_MapMarkerStyle)
Parameters
mapMarkerCenter
The coordinates of the center (Mercator)
orientation
Defines the orientation of the marker (if suitable). The valus is given in degree clockwise, 0 represents top.
northernAdjust
if set to YES the orientation is ignored and the marker is always directed towards the top of the map.
mapMarkerStyle
Defines which kind marker is being drawn, see NSDK_MapMarkerStyle
-
Sets the scale of the current MapView.
The scaling factor is a multiple of mercator units per pixel.
Declaration
Objective-C
- (void)setScale:(int)scale;
Swift
func setScale(_ scale: Int32)
Parameters
scale
the scale of the current MapView.
-
Gets the scale of the current MapView.
The scaling factor is a multiple of mercator units per pixel.
Declaration
Objective-C
- (int)getScale;
Swift
func getScale() -> Int32
Return Value
the scale of the current MapView
-
Translate the map by the given pixel amount
Declaration
Objective-C
- (void)translateMapByx:(int)x y:(int)y;
Swift
func translateMapByx(_ x: Int32, y: Int32)
Parameters
x
x coordinate translation
y
y coordinate translation
-
Rotates the map by amount of degrees
Declaration
Objective-C
- (void)rotateMapBy:(CGFloat)rotation;
Swift
func rotateMap(by rotation: CGFloat)
Parameters
rotation
the rotation in degrees. Positive values rotate the map clockwise, negative values counterclockwise
-
Rotates the map by amount of radians
Declaration
Objective-C
- (void)rotateMapByRadians:(CGFloat)rotation;
Swift
func rotateMap(byRadians rotation: CGFloat)
Parameters
rotation
the rotation in radians. Positive values rotate the map clockwise, negative values counterclockwise
-
zoom to the current route trace
Declaration
Objective-C
- (void)zoom2Route;
Swift
func zoom2Route()
-
zoom to the current route trace
Declaration
Objective-C
- (void)zoom2RouteWithTranslatex:(int)translateX y:(int)translateY routeId:(int)id;
Swift
func zoom2Route(withTranslatex translateX: Int32, y translateY: Int32, routeId id: Int32)
Parameters
translateX
translate the map x pixels afterwards
translateY
translate the map y pixels afterwards
id
route id
-
sets the map colors for the current map
Declaration
Objective-C
- (void)setMapDesign:(NSString *)filename isDay:(BOOL)isDay;
Swift
func setMapDesign(_ filename: String!, isDay: Bool)
Parameters
filename
the complete path with filename of the file which contains the map colors (must be included in the iOS App Bundle)
isDay
determines if the design is for day or night mode
-
Transforms coordinates from source format to the specified destination format
Declaration
Objective-C
- (NSDK_Position *) transformCoordinatesWithSourceFormat:(NSDK_CoordinateSystem)sourceFormat sourcePosition:(NSDK_Position *)source destinationFormat:(NSDK_CoordinateSystem)destinationFormat error:(NSError **)error;
Swift
func transformCoordinates(withSourceFormat sourceFormat: NSDK_CoordinateSystem, sourcePosition source: NSDK_Position!, destinationFormat: NSDK_CoordinateSystem) throws -> NSDK_Position
Parameters
sourceFormat
The enum value of the source format (see NSDK_CoordinateSystem). This can be a pixel value of the actual Mapview or specific coordinates (geodecimal, mercator).
source
X The input coordinate to transform.
destinationFormat
The enum value of the destination format of the transformation.
Return Value
the transformed coordinates.
-
Gets the orientation/rotation of the map.
Declaration
Objective-C
- (int)getOrientation:(NSError **)error;
Swift
func getOrientation(_ error: NSErrorPointer) -> Int32
Return Value
the orientation/rotation of the map
-
Sets the orientation/rotation of the map.
Declaration
Objective-C
- (void)setOrientation:(int)orientation;
Swift
func setOrientation(_ orientation: Int32)
-
Undocumented
Declaration
Objective-C
- (void) doAutoZoom:(NSDK_NavigationInformation*) navInfo gpsData:(NSDK_GPSData*) gpsData doSmoothZoom:(BOOL) doSmoothZoom error:(NSError**) error;
Swift
func doAutoZoom(_ navInfo: NSDK_NavigationInformation!, gpsData: NSDK_GPSData!, doSmoothZoom: Bool, error: NSErrorPointer)
-
Adjust the fix point of the Map view.
Declaration
Objective-C
- (void)setFixPoint:(NSDK_Position *)position;
Swift
func setFixPoint(_ position: NSDK_Position!)
Parameters
position
Relative position in percent of the screen pixel width counting from the center (e.g. to move left[right], use -1[1] to -99[99]).