SYMapView Class Reference

A UIView subclass used by an application to display a map. More...

#import <SYMapView.h>

Inheritance diagram for SYMapView:
Collaboration diagram for SYMapView:

Instance Methods

(nonnull instancetype) - initWithFrame:geoCenter:rotation:zoom:tilt:
 Initialize SYMapView with camera target values. More...
 
(SYCameraMovement cameraMovementMode) - __deprecated_msg
 Represents the camera movement mode. Take a look at the available SYCameraMovementModes. More...
 
(SYCameraRotation cameraRotationMode) - __deprecated_msg
 Represents the camera rotation behaviour. Take a look at the available SYCameraRotationModes. More...
 
(SYGeoCoordinate *geoCenter) - __deprecated_msg
 The SYGeoCoordinates corresponding to the current screen position of the transformCenter. More...
 
(CGFloat zoom) - __deprecated_msg
 Current view zoom level. The zoom level determines how "close" the map view is to the surface of the Earth. Higher zoom levels give a closer view. Zoom 1 is the view on the earth, zoom 10 is approximately view on city, 15 on street, etc. More...
 
(SYAngle rotation) - __deprecated_msg
 The current view rotation,in a range of degrees between [0..360). By default,the map is oriented with north toward the top of the map (0 degrees). As the orientation angle increases,the map rotates counter-clockwise so that at 90 degrees. More...
 
(SYGeoBoundingBox *boundingBox) - __deprecated_msg
 The SYGeoBoundingBox representing the current screen area of the SYMapView. More...
 
(SYAngle tilt) - __deprecated_msg
 Current view tilt in degrees <0,80> The tilt controls the perspective at which the map is viewed. A value of 0 degrees corresponds to looking straight down at the map from above (2D). As the tilt value is increased,the view shifts to a 3D perspective. More...
 
(BOOL isMapMoving) - __deprecated_msg
 YES if map is changing its position, NO otherwise. More...
 
(SYCameraRotationOffset cameraRotationOffset) - __deprecated_msg
 Setting this property will rotate camera around its axes. With default 0,0,0 rotation offset, camera is looking directly at SYMapView.geoCenter point. More...
 
(SYCameraTranslationOffset cameraTranslationOffset) - __deprecated_msg
 Camera translation from its origin point. More...
 
(nonnull NSArray< SYGeoCoordinate * > *) - geoCoordinatesFromScreenPoints:
 Converts points from screen coordinates to geographical coordinates. More...
 
(nonnull NSArray< NSString * > *) - availableSkins
 Enumerate available map skins. To set active skins, use SYMapView activeSkins property. More...
 
(nonnull NSArray< NSValue * > *) - screenPointsFromGeoCoordinates:
 Converts geographical coordinates to screen points stored as [NSValue valueWithCGPoint]. More...
 
(SYMapObjectsResult) - addMapObject:
 Adds a SYMapObject to the SYMapView. Valid geo coordinates will produce a valid point,even if the coordinates are not on the screen or are above the visible horizon,as long as the coordinates are not too far from the current map location. More...
 
(SYMapObjectsResult) - addMapObjects:
 Adds an array of SYMapObjects to the SYMapView. More...
 
(SYMapObjectsResult) - removeMapObject:
 Removes a SYMapObject from the SYMapView. More...
 
(SYMapObjectsResult) - removeMapObjects:
 Removes an array of SYMapObjects from the SYMapView. More...
 
(nullable SYTask *) - objectsAtPoint:withCompletion:
 Request a NSArray of all SYViewObject objects that are selected at a specified point on the screen. More...
 
(void) - setFpsLimitMode:withFpsLimit:
 Set target FPS value. More...
 
(SYAnimationId) - rotateView:withDuration:curve:completion:
 Rotate current view camera by offset in degrees. More...
 
(SYAnimationId) - dragView:withDuration:curve:completion:
 Drag current view camera by offset in screen points. More...
 
(SYAnimationId) - dragViewFrom:to:withDuration:curve:completion:
 Drag current view camera from one screen point to another screen point. More...
 
(SYAnimationId) - zoomView:atPoint:withDuration:curve:completion:
 Zoom current view camera by scale. More...
 
(SYAnimationId) - setViewBoundingBox:withEdgeInsets:duration:curve:completion:
 Transforms the map to fit an arbitrary geo bounding box. More...
 
(SYAnimationId) - animate:withDuration:curve:completion:
 Animate map view properties. More...
 
(nonnull SYCameraProperties *) - calculateCameraPropertiesForBoundingBox:transformCenter:rotation:tilt:maxZoomLevel:edgeInsets:
 Calculates camera properties to make reqested area visible with given parameters. More...
 
(void) - cancelAnimationWithId:
 Cancel animation. More...
 
("use camera method instead.") - __deprecated_msg
 Cancel all animations. More...
 
(void) - setTransformCenterSettings:withDuration:curve:
 Set map transform center point and animation properties. More...
 
(void) - setCameraRotationOffset:withDuration:curve:
 Set map camera rotation offset with animation. More...
 
(void) - setCameraTranslationOffset:withDuration:curve:
 Set map camera translation offset with animation. More...
 
("use camera method instead.") - __deprecated_msg
 Get map transform center settings. More...
 
("use camera method instead.") - __deprecated_msg
 Get actual transform center. More...
 
(void) - setVisibility:forMapLayerCategories:
 Set the visibility of the map layer categories to be rendered. The layer categories are specified using the SYMapLayerCategory enum. More...
 
(nullable SYAnnotationView *) - dequeueReusableAnnotationViewWithIdentifier:
 Used by the delegate to acquire a reusable annotation view, or create a new view for registered class, in lieu of allocating a new one. More...
 
(BOOL) - addAnnotation:
 Adds the specified SYAnnotation to the SYMapView. More...
 
(void) - removeAnnotation:
 Adds an array of SYAnnotation objects to the SYMapView. More...
 
(BOOL) - addMapMarkersCluster:
 Adds SYMapMarkersCluster to the SYMapView. More...
 
(BOOL) - removeMapMarkersCluster:
 Removes SYMapMarkersCluster from the SYMapView. More...
 
(nonnull NSArray< SYMapMarkersCluster * > *) - mapMarkersClusters
 Returns all SYMapMarkersClusters in the SYMapView. More...
 
(void) - releaseSdkView [implementation]
 

Class Methods

(NSHashTable< SYMapView * > *) + allMapViews [implementation]
 
(void) + releaseAllViews [implementation]
 

Properties

id< SYMapViewDelegatedelegate
 SYMapViewDelegate delegate. More...
 
SYMapCameracamera
 SYMapCamera provides interface to move and animate mapView. More...
 
BOOL renderEnabled
 Enables or disables rendering of the map view. More...
 
SYMapPositionIndicatorpositionIndicator
 The position indicator. More...
 
BOOL mapInteractionEnabled
 Enables or disables map gesture interaction for the SYMapView. If this property is set to NO,you can not use ani map gestures and you can implement yours. More...
 
NSArray< NSString * > * activeSkins
 Represents the current active skins. More...
 
NSString * displayLanguage
 The language which the map is set to render. It is nil if the display language isn't set and the default language English (en) is being used. More...
 
SYMapDisplayUnits displayUnits
 Units which the map is set to render. More...
 
NSArray< SYAnnotation * > * annotations
 Annotations are models used to annotate coordinates on the map. Implement [SYMapViewDelegate mapView:viewForAnnotation:] to return the annotation view for each annotation. More...
 
BOOL isMapGestureInProgress
 YES if any map move gesture is performed on SYMapView, NO otherwise. If SYMapView::mapInteractionEnabled is set to NO, property is always NO. More...
 
Sygic::Map::MapView * mapView [implementation]
 

Detailed Description

A UIView subclass used by an application to display a map.

Method Documentation

◆ __deprecated_msg() [1/13]

- (SYGeoCoordinate* geoCenter) __deprecated_msg ("use camera.geoCenter instead.") 

The SYGeoCoordinates corresponding to the current screen position of the transformCenter.

◆ __deprecated_msg() [2/13]

- (BOOL isMapMoving) __deprecated_msg ("use camera.isMoving instead.") 

YES if map is changing its position, NO otherwise.

◆ __deprecated_msg() [3/13]

- (SYCameraMovement cameraMovementMode) __deprecated_msg ("use camera.movementMode instead.") 

Represents the camera movement mode. Take a look at the available SYCameraMovementModes.

◆ __deprecated_msg() [4/13]

- (SYAngle rotation) __deprecated_msg ("use camera.rotation instead.") 

The current view rotation,in a range of degrees between [0..360). By default,the map is oriented with north toward the top of the map (0 degrees). As the orientation angle increases,the map rotates counter-clockwise so that at 90 degrees.

◆ __deprecated_msg() [5/13]

- (SYCameraRotation cameraRotationMode) __deprecated_msg ("use camera.rotationMode instead.") 

Represents the camera rotation behaviour. Take a look at the available SYCameraRotationModes.

◆ __deprecated_msg() [6/13]

- (SYCameraRotationOffset cameraRotationOffset) __deprecated_msg ("use camera.rotationOffset instead.") 

Setting this property will rotate camera around its axes. With default 0,0,0 rotation offset, camera is looking directly at SYMapView.geoCenter point.

◆ __deprecated_msg() [7/13]

- (SYGeoBoundingBox* boundingBox) __deprecated_msg ("use camera.tilt instead.") 

The SYGeoBoundingBox representing the current screen area of the SYMapView.

◆ __deprecated_msg() [8/13]

- (SYAngle tilt) __deprecated_msg ("use camera.tilt instead.") 

Current view tilt in degrees <0,80> The tilt controls the perspective at which the map is viewed. A value of 0 degrees corresponds to looking straight down at the map from above (2D). As the tilt value is increased,the view shifts to a 3D perspective.

The tilt of the map may be further constrained at some zoom levels. For example,no tilt is allowed at the lowest zoom levels when the globe is visible. This is to provide a better user experience when interacting with globe,since viewing a "tilted" globe does give any benefit.

◆ __deprecated_msg() [9/13]

- (SYCameraTranslationOffset cameraTranslationOffset) __deprecated_msg ("use camera.translationOffset instead.") 

Camera translation from its origin point.

◆ __deprecated_msg() [10/13]

- (CGFloat zoom) __deprecated_msg ("use camera.zoom instead.") 

Current view zoom level. The zoom level determines how "close" the map view is to the surface of the Earth. Higher zoom levels give a closer view. Zoom 1 is the view on the earth, zoom 10 is approximately view on city, 15 on street, etc.

◆ __deprecated_msg() [11/13]

- ("use camera method instead.") __deprecated_msg

Get map transform center settings.

◆ __deprecated_msg() [12/13]

- ("use camera method instead.") __deprecated_msg

Get actual transform center.

◆ __deprecated_msg() [13/13]

- ("use camera method instead.") __deprecated_msg

Cancel all animations.

◆ addAnnotation:()

- (BOOL) addAnnotation: (nonnull SYAnnotation *)  annotation

Adds the specified SYAnnotation to the SYMapView.

Returns
Returns YES if annotation was added successfully.

◆ addMapMarkersCluster:()

- (BOOL) addMapMarkersCluster: (nonnull SYMapMarkersCluster *)  markersCluster

◆ addMapObject:()

- (SYMapObjectsResult) addMapObject: (nonnull SYMapObject *)  mapObject

Adds a SYMapObject to the SYMapView. Valid geo coordinates will produce a valid point,even if the coordinates are not on the screen or are above the visible horizon,as long as the coordinates are not too far from the current map location.

Parameters
mapObjectSYMapObject to add.
Returns
SYMapObjectsResultSuccess if the mapObject was added successfully. Returns other SYMapObjectsResult if the object has already been added (duplicates are not allowed).

◆ addMapObjects:()

- (SYMapObjectsResult) addMapObjects: (nonnull NSArray< SYMapObject * > *)  mapObjects

Adds an array of SYMapObjects to the SYMapView.

Parameters
mapObjectsArray of SYMapObject to add.
Returns
SYMapObjectsResultSuccess if all mapObjects were added successfully, other SYMapObjectsResult otherwise.

◆ allMapViews()

+ (NSHashTable<SYMapView*>*) allMapViews
implementation

◆ animate:withDuration:curve:completion:()

- (SYAnimationId) animate: (nonnull void(^)(void))  animations
withDuration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Animate map view properties.

Parameters
animationsAnimation block containing properties changes. Animable properties are geoCenter, rotation, tilt and zoom. @duration Animation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation id.

◆ availableSkins()

- (nonnull NSArray<NSString*>*) availableSkins

Enumerate available map skins. To set active skins, use SYMapView activeSkins property.

◆ calculateCameraPropertiesForBoundingBox:transformCenter:rotation:tilt:maxZoomLevel:edgeInsets:()

- (nonnull SYCameraProperties*) calculateCameraPropertiesForBoundingBox: (nonnull SYGeoBoundingBox *)  boundingBox
transformCenter: (CGPoint)  transformCenter
rotation: (CGFloat)  rotation
tilt: (CGFloat)  tilt
maxZoomLevel: (CGFloat)  maxZoom
edgeInsets: ("use camera method instead.")  __deprecated_msg 

Calculates camera properties to make reqested area visible with given parameters.

Parameters
boundingBoxBoundingBox to display on map.
transformCenterRequested transform center.
rotationRequested rotation.
tiltRequested tilt.
maxZoomMaximum zoom level.
edgeInsetsEdge insets in relative screen coordinates <0,1>.

◆ cancelAnimationWithId:()

- (void) cancelAnimationWithId: ("use camera method instead.")  __deprecated_msg

Cancel animation.

◆ dequeueReusableAnnotationViewWithIdentifier:()

- (nullable SYAnnotationView*) dequeueReusableAnnotationViewWithIdentifier: (nonnull NSString *)  identifier

Used by the delegate to acquire a reusable annotation view, or create a new view for registered class, in lieu of allocating a new one.

◆ dragView:withDuration:curve:completion:()

- (SYAnimationId) dragView: (CGPoint)  drag
withDuration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Drag current view camera by offset in screen points.

Parameters
dragCamera move offset in screen points.
durationAnimation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation identifier. SYAnimationNone if animation param is nil or no animation was started.

◆ dragViewFrom:to:withDuration:curve:completion:()

- (SYAnimationId) dragViewFrom: (CGPoint)  from
to: (CGPoint)  to
withDuration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Drag current view camera from one screen point to another screen point.

Parameters
fromScreen from point.
toScreen to point.
durationAnimation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation identifier. SYAnimationNone if animation param is nil or no animation was started.

◆ geoCoordinatesFromScreenPoints:()

- (nonnull NSArray<SYGeoCoordinate*>*) geoCoordinatesFromScreenPoints: (nonnull NSArray< NSValue * > *)  screenPoints

Converts points from screen coordinates to geographical coordinates.

◆ initWithFrame:geoCenter:rotation:zoom:tilt:()

- (nonnull instancetype) initWithFrame: (CGRect)  frame
geoCenter: (nonnull SYGeoCoordinate *)  geoCenter
rotation: (SYAngle)  rotation
zoom: (CGFloat)  zoom
tilt: (SYAngle)  tilt 

Initialize SYMapView with camera target values.

◆ mapMarkersClusters()

- (nonnull NSArray<SYMapMarkersCluster*>*) mapMarkersClusters

Returns all SYMapMarkersClusters in the SYMapView.

◆ objectsAtPoint:withCompletion:()

- (nullable SYTask*) objectsAtPoint: (CGPoint)  point
withCompletion: (nonnull void(^)(NSArray< SYViewObject * > *_Nonnull))  completion 

Request a NSArray of all SYViewObject objects that are selected at a specified point on the screen.

Parameters
pointScreen point.
completionCompletion block.
Returns
SYTask instance.

◆ releaseAllViews()

+ (void) releaseAllViews
implementation

◆ releaseSdkView()

- (void) releaseSdkView
implementation

◆ removeAnnotation:()

- (void) removeAnnotation: (nonnull SYAnnotation *)  annotation

Adds an array of SYAnnotation objects to the SYMapView.

◆ removeMapMarkersCluster:()

- (BOOL) removeMapMarkersCluster: (nonnull SYMapMarkersCluster *)  markersCluster

Removes SYMapMarkersCluster from the SYMapView.

◆ removeMapObject:()

- (SYMapObjectsResult) removeMapObject: (nonnull SYMapObject *)  mapObject

Removes a SYMapObject from the SYMapView.

Parameters
mapObjectSYMapObject to remove.
Returns
SYMapObjectsResultSuccess if the mapObject was removed successfully, other SYMapObjectsResult otherwise.

◆ removeMapObjects:()

- (SYMapObjectsResult) removeMapObjects: (nonnull NSArray< SYMapObject * > *)  mapObjects

Removes an array of SYMapObjects from the SYMapView.

Parameters
mapObjectsArray of SYMapObject to be removed.
Returns
SYMapObjectsResultSuccess if all mapObjects were removed successfully, other SYMapObjectsResult otherwise.

◆ rotateView:withDuration:curve:completion:()

- (SYAnimationId) rotateView: (SYAngle)  angle
withDuration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Rotate current view camera by offset in degrees.

Parameters
angleCamera rotation offset in degrees.
durationAnimation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation identifier. SYAnimationNone if animation param is nil or no animation was started.

◆ screenPointsFromGeoCoordinates:()

- (nonnull NSArray<NSValue*>*) screenPointsFromGeoCoordinates: (nonnull NSArray< SYGeoCoordinate * > *)  geoCoords

Converts geographical coordinates to screen points stored as [NSValue valueWithCGPoint].

◆ setCameraRotationOffset:withDuration:curve:()

- (void) setCameraRotationOffset: (SYCameraRotationOffset offset
withDuration: (NSTimeInterval)  duration
curve: ("use camera method instead.")  __deprecated_msg 

Set map camera rotation offset with animation.

◆ setCameraTranslationOffset:withDuration:curve:()

- (void) setCameraTranslationOffset: (SYCameraTranslationOffset offset
withDuration: (NSTimeInterval)  duration
curve: ("use camera method instead.")  __deprecated_msg 

Set map camera translation offset with animation.

◆ setFpsLimitMode:withFpsLimit:()

- (void) setFpsLimitMode: (SYFpsLimitMode)  mode
withFpsLimit: (CGFloat)  limit 

Set target FPS value.

Parameters
modeSYFpsLimitMode.
limitIn case of SYFpsLimitModePerformance mode,limit means target fps value which is always tried to achieve. In case of SYFpsLimitModeBalanced,limit means lowest fps value,which is tried to achieve at slow camera movements to save battery life.

◆ setTransformCenterSettings:withDuration:curve:()

- (void) setTransformCenterSettings: (SYTransformCenterSettings settings
withDuration: (NSTimeInterval)  duration
curve: ("use camera method instead.")  __deprecated_msg 

Set map transform center point and animation properties.

◆ setViewBoundingBox:withEdgeInsets:duration:curve:completion:()

- (SYAnimationId) setViewBoundingBox: (nonnull SYGeoBoundingBox *)  boundingBox
withEdgeInsets: (UIEdgeInsets)  edgeInsets
duration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Transforms the map to fit an arbitrary geo bounding box.

Parameters
boundingBoxSYGeoBoundingBox to show.
edgeInsetsEdge insets in relative screen coordinates <0,1>.
durationAnimation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation identifier. SYAnimationNone if animation param is nil or no animation was started.

◆ setVisibility:forMapLayerCategories:()

- (void) setVisibility: (BOOL)  visible
forMapLayerCategories: (nonnull NSArray< NSNumber * > *)  layerCategories 

Set the visibility of the map layer categories to be rendered. The layer categories are specified using the SYMapLayerCategory enum.

Parameters
visibleYES to make map layer categories visible, NO to hide.
layerCategoriesAn array of NSNumber objects containing SYMapLayerCategory values.

◆ zoomView:atPoint:withDuration:curve:completion:()

- (SYAnimationId) zoomView: (CGFloat)  scale
atPoint: (CGPoint)  center
withDuration: (NSTimeInterval)  duration
curve: (SYMapAnimationCurve)  curve
completion: ("use camera method instead.")  __deprecated_msg 

Zoom current view camera by scale.

Parameters
scaleZoom scale.
centerScreen point to zoom at. Usually represents center of pinch gesture toches. Ignored if SYMapView.cameraMovementMode is not SYCameraMovementFree.
durationAnimation duration.
curveAnimation curve.
completionAnimation completion block.
Returns
Animation identifier. SYAnimationNone if animation param is nil or no animation was started.

Property Documentation

◆ activeSkins

- (NSArray<NSString*>*) activeSkins
readwritenonatomiccopy

Represents the current active skins.

◆ annotations

- (NSArray<SYAnnotation*>*) annotations
readnonatomicassign

Annotations are models used to annotate coordinates on the map. Implement [SYMapViewDelegate mapView:viewForAnnotation:] to return the annotation view for each annotation.

◆ camera

- (SYMapCamera*) camera
readnonatomicassign

SYMapCamera provides interface to move and animate mapView.

◆ delegate

- (id<SYMapViewDelegate>) delegate
readwritenonatomicweak

SYMapViewDelegate delegate.

◆ displayLanguage

- (NSString*) displayLanguage
readwritenonatomicstrong

The language which the map is set to render. It is nil if the display language isn't set and the default language English (en) is being used.

◆ displayUnits

- (SYMapDisplayUnits) displayUnits
readwritenonatomicassign

Units which the map is set to render.

◆ isMapGestureInProgress

- (BOOL) isMapGestureInProgress
readnonatomicassign

YES if any map move gesture is performed on SYMapView, NO otherwise. If SYMapView::mapInteractionEnabled is set to NO, property is always NO.

◆ mapInteractionEnabled

- (BOOL) mapInteractionEnabled
readwritenonatomicassign

Enables or disables map gesture interaction for the SYMapView. If this property is set to NO,you can not use ani map gestures and you can implement yours.

◆ mapView

- Map:
readwritenonatomicassignimplementation

◆ positionIndicator

- (SYMapPositionIndicator*) positionIndicator
readnonatomicassign

The position indicator.

◆ renderEnabled

- (BOOL) renderEnabled
readwritenonatomicassign

Enables or disables rendering of the map view.


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