A UIView subclass used by an application to display a map. More...
#import <SYMapCamera.h>
Instance Methods | |
(SYTransformCenterSettings) | - transformCenterSettings |
Get map transform center settings. More... | |
(CGPoint) | - transformCenter |
Get actual transform center. 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) | - setViewBoundingBox:withEdgeInsets:maxZoomLevel:duration:curve:completion: |
Transforms the map to fit an arbitrary geo bounding box. More... | |
(void) | - setTransformCenterSettings:withDuration:curve: |
Set map transform center point and animation properties. More... | |
(void) | - setRotationOffset:withDuration:curve: |
Set map camera rotation offset with animation. More... | |
(void) | - setTranslationOffset:withDuration:curve: |
Set map camera translation offset with animation. More... | |
(SYAnimationId) | - animate:withDuration:curve:completion: |
Animate map view properties. More... | |
(void) | - cancelAnimationWithId: |
Cancel animation. More... | |
(void) | - cancelAllAnimations |
Cancel all animations. More... | |
(nonnull SYCameraProperties *) | - calculateCameraPropertiesForBoundingBox:transformCenter:rotation:tilt:maxZoomLevel:edgeInsets: |
Calculates camera properties to make reqested area visible with given parameters. More... | |
Properties | |
id< SYMapCameraDelegate > | delegate |
SYMapCameraDelegate delegate. More... | |
SYGeoCoordinate * | geoCenter |
The SYGeoCoordinates corresponding to the current screen position of the transformCenter. More... | |
CGFloat | zoom |
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 |
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... | |
SYAngle | tilt |
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... | |
SYCameraMovement | movementMode |
Represents the camera movement mode. Take a look at the available SYCameraMovementModes. More... | |
SYCameraRotation | rotationMode |
Represents the camera rotation behaviour. Take a look at the available SYCameraRotationModes. More... | |
SYGeoBoundingBox * | boundingBox |
The SYGeoBoundingBox representing the current screen area of the SYMapView. More... | |
SYCameraRotationOffset | rotationOffset |
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 | translationOffset |
Camera translation from its origin point. More... | |
BOOL | isMoving |
YES if map is changing its position, NO otherwise. More... | |
A UIView subclass used by an application to display a map.
- (SYTransformCenterSettings) transformCenterSettings |
Get map transform center settings.
- (CGPoint) transformCenter |
Get actual transform center.
- (SYAnimationId) rotateView: | (SYAngle) | angle | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Rotate current view camera by offset in degrees.
angle | Camera rotation offset in degrees. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (SYAnimationId) dragView: | (CGPoint) | drag | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Drag current view camera by offset in screen points.
drag | Camera move offset in screen points. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (SYAnimationId) dragViewFrom: | (CGPoint) | from | |
to: | (CGPoint) | to | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Drag current view camera from one screen point to another screen point.
from | Screen from point. |
to | Screen to point. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (SYAnimationId) zoomView: | (CGFloat) | scale | |
atPoint: | (CGPoint) | center | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Zoom current view camera by scale.
scale | Zoom scale. |
center | Screen point to zoom at. Usually represents center of pinch gesture toches. Ignored if SYMapView.cameraMovementMode is not SYCameraMovementFree. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (SYAnimationId) setViewBoundingBox: | (nonnull SYGeoBoundingBox *) | boundingBox | |
withEdgeInsets: | (UIEdgeInsets) | edgeInsets | |
duration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Transforms the map to fit an arbitrary geo bounding box.
boundingBox | SYGeoBoundingBox to show. |
edgeInsets | Edge insets in relative screen coordinates <0,1>. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (SYAnimationId) setViewBoundingBox: | (nonnull SYGeoBoundingBox *) | boundingBox | |
withEdgeInsets: | (UIEdgeInsets) | edgeInsets | |
maxZoomLevel: | (CGFloat) | maxZoom | |
duration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Transforms the map to fit an arbitrary geo bounding box.
boundingBox | SYGeoBoundingBox to show. |
edgeInsets | Edge insets in relative screen coordinates <0,1>. |
maxZoom | Maximal zoom level of the resulting view (0,20>. |
duration | Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (void) setTransformCenterSettings: | (SYTransformCenterSettings) | settings | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
Set map transform center point and animation properties.
- (void) setRotationOffset: | (SYCameraRotationOffset) | offset | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
Set map camera rotation offset with animation.
- (void) setTranslationOffset: | (SYCameraTranslationOffset) | offset | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
Set map camera translation offset with animation.
- (SYAnimationId) animate: | (nonnull void(^)(void)) | animations | |
withDuration: | (NSTimeInterval) | duration | |
curve: | (SYMapAnimationCurve) | curve | |
completion: | (nullable SYAnimationCompletionBlock) | completion | |
Animate map view properties.
animations | Animation block containing properties changes. Animable properties are geoCenter, rotation, tilt and zoom. @duration Animation duration. |
curve | Animation curve. |
completion | Animation completion block. |
- (void) cancelAnimationWithId: | (SYAnimationId) | animation |
Cancel animation.
- (void) cancelAllAnimations |
Cancel all animations.
- (nonnull SYCameraProperties*) calculateCameraPropertiesForBoundingBox: | (nonnull SYGeoBoundingBox *) | boundingBox | |
transformCenter: | (CGPoint) | transformCenter | |
rotation: | (CGFloat) | rotation | |
tilt: | (CGFloat) | tilt | |
maxZoomLevel: | (CGFloat) | maxZoom | |
edgeInsets: | (UIEdgeInsets) | edgeInsets | |
Calculates camera properties to make reqested area visible with given parameters.
boundingBox | BoundingBox to display on map. |
transformCenter | Requested transform center. |
rotation | Requested rotation. |
tilt | Requested tilt. |
maxZoom | Maximum zoom level. |
edgeInsets | Edge insets in relative screen coordinates <0,1>. |
|
readwritenonatomicweak |
SYMapCameraDelegate delegate.
|
readwritenonatomicstrong |
The SYGeoCoordinates corresponding to the current screen position of the transformCenter.
|
readwritenonatomicassign |
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.
|
readwritenonatomicassign |
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.
|
readwritenonatomicassign |
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.
|
readwritenonatomicassign |
Represents the camera movement mode. Take a look at the available SYCameraMovementModes.
|
readwritenonatomicassign |
Represents the camera rotation behaviour. Take a look at the available SYCameraRotationModes.
|
readwritenonatomicstrong |
The SYGeoBoundingBox representing the current screen area of the SYMapView.
|
readwritenonatomicassign |
Setting this property will rotate camera around its axes. With default 0,0,0 rotation offset, camera is looking directly at SYMapView.geoCenter point.
|
readwritenonatomicassign |
Camera translation from its origin point.
|
readnonatomicassign |
YES if map is changing its position, NO otherwise.