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

Description

Analysis of visibility along a line between two locations.

Instances of this class represent an analysis object that evaluates visibility along a line defined by observer and target locations.

The result of the analysis is a line between the observer and the target locations (each using Point geometry). Visible and obstructed portions of the line are displayed with unique colors (green and red by default).

License Restrictions:
This feature requires a Standard license for production deployment. No license required in Developer mode for testing.

Since
100.2
Inheritance diagram for AGSLocationLineOfSight:
AGSLineOfSight AGSAnalysis AGSObject

Instance Methods

(instancetype) - initWithObserverLocation:targetLocation:
 

Class Methods

(instancetype) + lineOfSightWithObserverLocation:targetLocation:
 
(CGFloat) + lineWidth
 
(AGSColor *) + obstructedColor
 
(void) + setLineWidth:
 
(void) + setObstructedColor:
 
(void) + setVisibleColor:
 
(AGSColor *) + visibleColor
 

Properties

AGSPointobserverLocation
 
AGSPointtargetLocation
 
AGSLineOfSightTargetVisibility targetVisibility
 
BOOL visible
 

Method Documentation

◆ initWithObserverLocation:targetLocation:

- (instancetype) initWithObserverLocation: (AGSPoint *)  observerLocation
targetLocation: (AGSPoint *)  targetLocation 

Intialize the analysis with the provided observer and target locations. As a result of the analysis, a line is rendered between the observer and target with distinct colors representing visible and obstructed segments.

Parameters
observerLocationdefining the observer's location
targetLocationdefining the target's location
Returns
Initialized line of sight analysis
Since
100.2

◆ lineOfSightWithObserverLocation:targetLocation:

+ (instancetype) lineOfSightWithObserverLocation: (AGSPoint *)  observerLocation
targetLocation: (AGSPoint *)  targetLocation 

Intialize the analysis with the provided observer and target locations. As a result of the analysis, a line is rendered between the observer and target with distinct colors representing visible and obstructed segments.

Parameters
observerLocationdefining the observer's location
targetLocationdefining the target's location
Returns
Initialized line of sight analysis
Since
100.2

◆ lineWidth

+ (CGFloat) lineWidth

The line width used to render analysis results. This setting is applied to all line of sight analyses in the view.

Since
100.2

◆ obstructedColor

+ (AGSColor *) obstructedColor

The color used to render segments that are not visible along the analysis results. Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This setting is applied to all line of sight analyses in the view.

Since
100.2

◆ setLineWidth:

+ (void) setLineWidth: (CGFloat)  lineWidth

Sets the line width used to render analysis results. This setting is applied to all line of sight analyses in the view.

Parameters
lineWidthin points
Since
100.2

◆ setObstructedColor:

+ (void) setObstructedColor: (AGSColor *)  obstructedColor

Sets the color used to render segments that are not visible along the analysis results. Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This setting is applied to all line of sight analyses in the view.

Parameters
obstructedColorused to render segments that are not visible
Since
100.2

◆ setVisibleColor:

+ (void) setVisibleColor: (AGSColor *)  visibleColor

Sets the color used to render segments that are visible along the analysis results. Sections of the line between the observer and the target that are visible are drawn with the specified color. This setting is applied to all line of sight analyses in the view.

Parameters
visibleColorused to render segments that are visible
Since
100.2

◆ visibleColor

+ (AGSColor *) visibleColor

The color used to render segments that are visible along the analysis results. Sections of the line between the observer and the target that are visible are drawn with the specified color. This setting is applied to all line of sight analyses in the view.

Since
100.2

Property Documentation

◆ observerLocation

- (AGSPoint*) observerLocation
readwritenonatomicstrong

The location representing the observer

Since
100.2

◆ targetLocation

- (AGSPoint*) targetLocation
readwritenonatomicstrong

The location representing the target

Since
100.2

◆ targetVisibility

- (AGSLineOfSightTargetVisibility) targetVisibility
readnonatomicassigninherited

Indicates state of the target's visbility.

Since
100.2

◆ visible

- (BOOL) visible
readwritenonatomicassigninherited

Indicates whether the results of this analysis should be visible or not. Visibility can be controlled for individual analyses as well as for the analysis overlay that contains them.

Since
100.2