ArcGIS Runtime SDK for iOS: AGSViewpoint Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSViewpoint Class Reference

Description

Represents the view location of an AGSMapView or AGSSceneView object.

Since
100
Inheritance diagram for AGSViewpoint:
AGSObject <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithCenter:scale:
 
(instancetype) - initWithCenter:scale:camera:
 
(instancetype) - initWithCenter:scale:rotation:
 
(instancetype) - initWithCenter:scale:rotation:camera:
 
(instancetype) - initWithLatitude:longitude:scale:
 
(instancetype) - initWithLatitude:longitude:scale:camera:
 
(instancetype) - initWithTargetExtent:
 
(instancetype) - initWithTargetExtent:camera:
 
(instancetype) - initWithTargetExtent:rotation:
 
(instancetype) - initWithTargetExtent:rotation:camera:
 
(BOOL) - isEqualToViewpoint:
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + viewpointWithCenter:scale:
 
(instancetype) + viewpointWithCenter:scale:camera:
 
(instancetype) + viewpointWithCenter:scale:rotation:
 
(instancetype) + viewpointWithCenter:scale:rotation:camera:
 
(instancetype) + viewpointWithLatitude:longitude:scale:
 
(instancetype) + viewpointWithLatitude:longitude:scale:camera:
 
(instancetype) + viewpointWithTargetExtent:
 
(instancetype) + viewpointWithTargetExtent:camera:
 
(instancetype) + viewpointWithTargetExtent:rotation:
 
(instancetype) + viewpointWithTargetExtent:rotation:camera:
 

Properties

AGSCameracamera
 
double rotation
 
AGSGeometrytargetGeometry
 
double targetScale
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 
AGSViewpointType viewpointType
 

Method Documentation

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithCenter:scale:

- (instancetype) initWithCenter: (AGSPoint *)  center
scale: (double)  scale 

Creates a viewpoint with center point and scale.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
See also
AGSViewpoint
Since
100.0

◆ initWithCenter:scale:camera:

- (instancetype) initWithCenter: (AGSPoint *)  center
scale: (double)  scale
camera: (AGSCamera *)  camera 

Creates a viewpoint with the center, scale, and camera parameters.

Center and scale will be used when working with a map. The camera will be used when working with a scene.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
cameraAn AGSCamera object that defines the observer for the scene.
See also
AGSViewpoint
Since
100.0

◆ initWithCenter:scale:rotation:

- (instancetype) initWithCenter: (AGSPoint *)  center
scale: (double)  scale
rotation: (double)  rotation 

Creates a viewpoint with the center, scale, and rotation parameters.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
See also
AGSViewpoint
Since
100.0

◆ initWithCenter:scale:rotation:camera:

- (instancetype) initWithCenter: (AGSPoint *)  center
scale: (double)  scale
rotation: (double)  rotation
camera: (AGSCamera *)  camera 

Creates a viewpoint with the center, scale, rotation, and camera parameters.

Center, scale, and rotation will be used when working with a map. The camera will be used when working with a scene.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
cameraAn AGSCamera object that defines the observer for the scene.
See also
AGSViewpoint
Since
100.0

◆ initWithLatitude:longitude:scale:

- (instancetype) initWithLatitude: (double)  latitude
longitude: (double)  longitude
scale: (double)  scale 

Creates a viewpoint with the latitude, longitude, and scale parameters.

The spatial reference for the defined point is WGS84.

Parameters
latitudeThe latitude coordinate for the viewpoint. Negative values are south of the equator.
longitudeThe longitude coordinate for the viewpoint. Negative values are west of the prime meridian.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
See also
AGSViewpoint
Since
100.0

◆ initWithLatitude:longitude:scale:camera:

- (instancetype) initWithLatitude: (double)  latitude
longitude: (double)  longitude
scale: (double)  scale
camera: (AGSCamera *)  camera 

Creates a viewpoint with the latitude, longitude, scale, and camera parameters.

The spatial reference for the defined point is WGS84. Latitude, longitude, and scale will be used when working with a map. The camera will be used when working with a scene.

Parameters
latitudeThe latitude coordinate for the viewpoint. Negative values are south of the equator.
longitudeThe longitude coordinate for the viewpoint. Negative values are west of the prime meridian.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
cameraAn AGSCamera object that defines the observer for the scene.
See also
AGSViewpoint
Since
100.0

◆ initWithTargetExtent:

- (instancetype) initWithTargetExtent: (AGSEnvelope *)  targetExtent

Creates a viewpoint with the targetExtent parameter. The final extent may be different depending upon the difference in aspect ratio of the targetExtent parameter and the map/scene.

Parameters
targetExtentThe geometry to use as the visible area.
See also
AGSViewpoint
Since
100.0

◆ initWithTargetExtent:camera:

- (instancetype) initWithTargetExtent: (AGSEnvelope *)  targetExtent
camera: (AGSCamera *)  camera 

Creates a viewpoint with the targetExtent and camera paramters.

Target extent & rotation will be used when working with a map. The camera will be used when working with a scene.

Parameters
targetExtentThe geometry to use as the visible area.
cameraAn AGSCamera object that defines the observer for the scene.
See also
AGSViewpoint
Since
100.4

◆ initWithTargetExtent:rotation:

- (instancetype) initWithTargetExtent: (AGSEnvelope *)  targetExtent
rotation: (double)  rotation 

Creates a viewpoint with the targetExtent and rotation parameters.

Parameters
targetExtentThe geometry to use as the visible area.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
See also
AGSViewpoint
Since
100.0

◆ initWithTargetExtent:rotation:camera:

- (instancetype) initWithTargetExtent: (AGSEnvelope *)  targetExtent
rotation: (double)  rotation
camera: (AGSCamera *)  camera 

Creates a viewpoint with the targetExtent, rotation, and camera parameters.

Target extent & rotation will be used when working with a map. The camera will be used when working with a scene.

Parameters
targetExtentThe geometry to use as the visible area.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
cameraAn AGSCamera object that defines the observer for the scene.
See also
AGSViewpoint
Since
100.0

◆ isEqualToViewpoint:

- (BOOL) isEqualToViewpoint: (AGSViewpoint *)  other

Compares whether this viewpoint is equal to another.

Parameters
otherThe viewpoint to compare this one to.
Returns
Whether the two viewpoints are equal.
Since
100

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

◆ viewpointWithCenter:scale:

+ (instancetype) viewpointWithCenter: (AGSPoint *)  center
scale: (double)  scale 

Creates a viewpoint with the center and scale parameters.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithCenter:scale:camera:

+ (instancetype) viewpointWithCenter: (AGSPoint *)  center
scale: (double)  scale
camera: (AGSCamera *)  camera 

Creates a viewpoint with the center, scale, and camera parameters.

Center and scale will be used when working with a map. The camera will be used when working with a scene.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
cameraAn AGSCamera object that defines the observer for the scene.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithCenter:scale:rotation:

+ (instancetype) viewpointWithCenter: (AGSPoint *)  center
scale: (double)  scale
rotation: (double)  rotation 

Creates a viewpoint with the center, scale, and rotation parameters.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithCenter:scale:rotation:camera:

+ (instancetype) viewpointWithCenter: (AGSPoint *)  center
scale: (double)  scale
rotation: (double)  rotation
camera: (AGSCamera *)  camera 

Creates a viewpoint with the center, scale, rotation, and camera parameters.

Center, scale, and rotation will be used when working with a map. The camera will be used when working with a scene.

Parameters
centerThe center of the visible area.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
rotationThe rotation angle in degrees between 0 and 360.
cameraAn AGSCamera object that defines the observer for the scene.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithLatitude:longitude:scale:

+ (instancetype) viewpointWithLatitude: (double)  latitude
longitude: (double)  longitude
scale: (double)  scale 

Creates a viewpoint with the latitude, longitude, and scale parameters.

The spatial reference for the defined point is WGS84.

Parameters
latitudeThe latitude coordinate for the viewpoint. Negative values are south of the equator.
longitudeThe longitude coordinate for the viewpoint. Negative values are west of the prime meridian.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithLatitude:longitude:scale:camera:

+ (instancetype) viewpointWithLatitude: (double)  latitude
longitude: (double)  longitude
scale: (double)  scale
camera: (AGSCamera *)  camera 

Creates a viewpoint with the latitude, longitude, scale, and camera parameters.

The spatial reference for the defined point is WGS84. Latitude, longitude, and scale will be used when working with a map. The camera will be used when working with a scene.

Parameters
latitudeThe latitude coordinate for the viewpoint. Negative values are south of the equator.
longitudeThe longitude coordinate for the viewpoint. Negative values are west of the prime meridian.
scaleThe ratio between a distance on the map and the corresponding distance on the ground.
cameraAn AGSCamera object that defines the observer for the scene.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithTargetExtent:

+ (instancetype) viewpointWithTargetExtent: (AGSEnvelope *)  targetExtent

Creates a viewpoint with the targetExtent parameter.

The final extent may be different depending upon the difference in aspect ratio of the targetExtent and the map/scene.

Parameters
targetExtentThe geometry to use as the visible area.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

◆ viewpointWithTargetExtent:camera:

+ (instancetype) viewpointWithTargetExtent: (AGSEnvelope *)  targetExtent
camera: (AGSCamera *)  camera 

Creates a viewpoint with the targetExtent and camera parameters.

Target extent will be used when working with a map. The camera will be used when working with a scene.

Parameters
targetExtentThe geometry to use as the visible area.
cameraAn AGSCamera object that defines the observer for the scene.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.4

◆ viewpointWithTargetExtent:rotation:

+ (instancetype) viewpointWithTargetExtent: (AGSEnvelope *)  targetExtent
rotation: (double)  rotation 

Creates a viewpoint with the targetExtent and rotation parameters.

Parameters
targetExtentThe extent at which the map/scene should be displayed. The final extent may be different depending upon the difference in aspect ratio of the targetExtent and the map/scene.
rotationThe rotation by which the map/scene should be rotated (in counter-clockwise direction).
Returns
A new viewpoint object.
Since
100

◆ viewpointWithTargetExtent:rotation:camera:

+ (instancetype) viewpointWithTargetExtent: (AGSEnvelope *)  targetExtent
rotation: (double)  rotation
camera: (AGSCamera *)  camera 

Creates a viewpoint with the targetExtent, rotation, and camera parameters.

Target extent & rotation will be used when working with a map. The camera will be used when working with a scene.

Parameters
targetExtentThe geometry to use as the visible area.
rotationThe rotation angle in degrees between 0 and 360 (in counter-clockwise direction).
cameraAn AGSCamera object that defines the observer for the scene.
Returns
A new viewpoint object.
See also
AGSViewpoint
Since
100.0

Property Documentation

◆ camera

- (AGSCamera*) camera
readnonatomicstrong

The viewpoint's camera.

See also
AGSViewpoint, AGSCamera
Since
100.4

◆ rotation

- (double) rotation
readnonatomicassign

The viewpoint rotation angle in degrees between 0 and 360 (in counter-clockwise direction).

See also
AGSViewpoint
Since
100.0

◆ targetGeometry

- (AGSGeometry*) targetGeometry
readnonatomicstrong

The geometry represented by this viewpoint. If viewpointType is AGSViewpointTypeCenterAndScale, this contains a point geometry. If viewpointType is AGSViewpointTypeBoundingGeometry, this contains an envelope geometry.

Since
100

◆ targetScale

- (double) targetScale
readnonatomicassign

The map scale represented by this viewpoint. Only applicable if viewpointType is AGSViewpointTypeCenterAndScale.

Since
100

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100

◆ viewpointType

- (AGSViewpointType) viewpointType
readnonatomicassign

The type of information contained in this viewpoint object.

Since
100