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

Description

Represents the view location of AGSMapView or AGSSceneView.

Instances of this class represent a view location of AGSMapView or AGSSceneView

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.

The spatial reference of the center point cannot be nil.

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 

Create a viewpoint with center point, scale, and AGSCamera.

The spatial reference of the center point cannot be nil. Center and scale will be used when working with a map, 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 

Create a viewpoint with center point, scale, and rotation.

The spatial reference of the center point cannot be nil.

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 

Create a viewpoint with center point, scale, rotation, and AGSCamera.

The spatial reference of the center point cannot be nil. Center, scale, and rotation will be used when working with a map, 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 

Create a viewpoint with latitude, longitude, and scale.

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 

Create a viewpoint with latitude, longitude, scale, and AGSCamera

The spatial reference for the defined point is WGS84. Latitude, longitude, and scale will be used when working with a map, 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

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

The spatial reference of the target geometry cannot be nil.

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

§ initWithTargetExtent:camera:()

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

Create a viewpoint with a bounding extent and an AGSCamera.

The spatial reference of the target geometry cannot be nil. Target extent & rotation will be used when working with a map, 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 

Create a viewpoint with a bounding extent and rotation.

The spatial reference of the target geometry cannot be nil.

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 

Create a viewpoint with a bounding extent, rotation, and AGSCamera.

The spatial reference of the target geometry cannot be nil. Target extent & rotation will be used when working with a map, 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
otherviewpoint 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 center point and scale.

The spatial reference of the center point cannot be nil.

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

§ viewpointWithCenter:scale:camera:()

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

Create a viewpoint with center point, scale, and AGSCamera.

The spatial reference of the center point cannot be nil. Center and scale will be used when working with a map, 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

§ viewpointWithCenter:scale:rotation:()

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

Create a viewpoint with center point, scale, and rotation.

The spatial reference of the center point cannot be nil.

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

§ viewpointWithCenter:scale:rotation:camera:()

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

Create a viewpoint with center point, scale, rotation, and AGSCamera.

The spatial reference of the center point cannot be nil. Center, scale, and rotation will be used when working with a map, 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.
See also
AGSViewpoint
Since
100.0

§ viewpointWithLatitude:longitude:scale:()

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

Create a viewpoint with latitude, longitude, and scale.

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

§ viewpointWithLatitude:longitude:scale:camera:()

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

Create a viewpoint with latitude, longitude, scale, and AGSCamera

The spatial reference for the defined point is WGS84. Latitude, longitude, and scale will be used when working with a map, 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

§ viewpointWithTargetExtent:()

+ (instancetype) viewpointWithTargetExtent: (AGSEnvelope *)  targetExtent

Create a viewpoint with a bounding extent.

The spatial reference of the target geometry cannot be nil. 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.
See also
AGSViewpoint
Since
100.0

§ viewpointWithTargetExtent:camera:()

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

Create a viewpoint with a bounding extent and an AGSCamera.

The spatial reference of the target geometry cannot be nil. Target extent will be used when working with a map, 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

§ viewpointWithTargetExtent:rotation:()

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

Initialize the viewpoint with an extent and rotation

Parameters
targetExtentat 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.
rotationangle by which the map/scene should be rotated (in counter-clockwise direction)
Returns
Initialized viewpoint
Since
100

§ viewpointWithTargetExtent:rotation:camera:()

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

Create a viewpoint with a bounding extent, rotation, and AGSCamera.

The spatial reference of the target geometry cannot be nil. Target extent & rotation will be used when working with a map, 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

Property Documentation

§ camera

- (AGSCamera*) camera
readnonatomicstrong

The viewpoint's AGSCamera.

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

Since
100