ArcGIS Runtime SDK for iOS: AGSKMLNetworkLink Class Reference
ArcGIS Runtime SDK for iOS  100.13
AGSKMLNetworkLink Class Reference

Description

A KML Network Link element.

An instance of this class represents a KML <NetworkLink> element which references a KML file or KMZ archive on a local or remote network.

Note
A KML network link can have a refresh interval defined to enable regular refresh of data. Alternatively, KML network links support a view refresh mode, which fetches network links based on the visible extent.
Since
100.4
Inheritance diagram for AGSKMLNetworkLink:
AGSKMLNode AGSObject

Instance Methods

(instancetype) - initWithURL:
 
(void) - refresh
 
(id< AGSCancelable >) - saveToFileURL:completion:
 

Class Methods

(instancetype) + KMLNetworkLinkWithURL:
 
(instancetype) + KMLNode
 

Properties

NSString * address
 
AGSColorballoonBackgroundColor
 
NSString * balloonContent
 
BOOL canFlyToNode
 
NSArray< AGSKMLNode * > * childNodes
 
AGSEnvelopeextent
 
BOOL hasRefreshVisibility
 
BOOL highlighted
 
AGSKMLStylehighlightStyle
 
AGSKMLListItemType listItemType
 
NSString * name
 
NSString * nodeDescription
 
NSString * nodeID
 
BOOL open
 
AGSKMLNodeparentNode
 
BOOL partiallyVisible
 
NSError * refreshError
 
NSTimeInterval refreshInterval
 
AGSKMLRefreshMode refreshMode
 
AGSKMLRefreshStatus refreshStatus
 
NSString * snippet
 
NSInteger snippetMaxLines
 
AGSKMLStylestyle
 
AGSTimeExtenttimeExtent
 
NSURL * URL
 
AGSImageUXIcon
 
AGSColorUXIconColor
 
NSInteger UXIconID
 
AGSKMLViewpointviewpoint
 
AGSKMLViewRefreshMode viewRefreshMode
 
NSTimeInterval viewRefreshTime
 
BOOL visible
 

Method Documentation

◆ initWithURL:

- (instancetype) initWithURL: (NSURL *)  URL

Initialize a KML network link with URL to a KML/KMZ file on the web or on disk.

Parameters
URLto a KML/KMZ file on the web or on disk.
Returns
A new kml network link
Since
100.6

◆ KMLNetworkLinkWithURL:

+ (instancetype) KMLNetworkLinkWithURL: (NSURL *)  URL

Initialize a KML network link with URL to a KML/KMZ file on the web or on disk.

Parameters
URLto a KML/KMZ file on the web or on disk.
Returns
A new kml network link
Since
100.6

◆ KMLNode

+ (instancetype) KMLNode
Deprecated:
100.9. Do not use this method, it creates an invalid and incomplete object.

◆ refresh

- (void) refresh

Refreshes the KML network link.

See also
AGSKMLRefreshMode
Since
100.6

Property Documentation

◆ address

- (NSString*) address
readwritenonatomiccopyinherited

The address of the KML node. Represents an unstructured address such as a street, city, state address, and/or a postal code.

Since
100.7

◆ balloonBackgroundColor

- (AGSColor*) balloonBackgroundColor
readnonatomicstronginherited

The KML node's balloon background color, which should be used when showing a popup.

Note
This color can be used for the UI "chrome" that presents the balloonContent, such as the border and background of a Callout.
Since
100.4

◆ balloonContent

- (NSString*) balloonContent
readnonatomiccopyinherited

The content that should be displayed in a balloon popup of the KML node as HTML.

Since
100.4

◆ canFlyToNode

- (BOOL) canFlyToNode
readwritenonatomicassign

Indicates whether the app should zoom to the viewpoint defined on the associated <NetworkLinkControl> or the network links' top-level <kml> node upon refresh of the link.

Note
It is the developer's responsibility to implement this behavior if desired; Runtime will not automatically fly to the node on network link refresh.
The viewpoint can be monitored using Key-Value Observing (KVO) to detect when the geoview's viewpoint should be updated.
This value is defined in the flyToView tag in the network link.
Since
100.4

◆ childNodes

- (NSArray<AGSKMLNode*>*) childNodes
readnonatomiccopy

The KML network link's child nodes. When the network link is successfully refreshed, this array gets populated with new nodes. The child node changes can be monitored using Key-Value Observing (KVO).

Since
100.4

◆ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

The KML node's bounding extent.

Note
All coordinates in KML are expressed in latitude and longitude (using decimal degrees) and are in the WGS84 geographic coordinate system.
Since
100.4

◆ hasRefreshVisibility

- (BOOL) hasRefreshVisibility
readwritenonatomicassign

Indicates whether Runtime should attempt to maintain the visibility selection of child nodes in the network link after refresh. If true, Runtime will attempt to maintain any visibility selection for the network link's child nodes after refresh. This is the default behavior when refreshVisibility is 0 or unset in the source KML file.

Since
100.4

◆ highlighted

- (BOOL) highlighted
readwritenonatomicassigninherited

Indicates whether the KML node is highlighted. This controls whether the default style or an alternate 'highlighted' style (if present) is used for rendering the node.

Note
This is unrelated to the concept of selection in ArcGIS Runtime.
Since
100.4

◆ highlightStyle

- (AGSKMLStyle*) highlightStyle
readwritenonatomicstronginherited

The KML node's highlight style. This style is used when the KML node has been highlighted / selected.

See also
AGSKMLStyle
Since
100.6

◆ listItemType

- (AGSKMLListItemType) listItemType
readwritenonatomicassign

Specifies the network link's list item type, which defines how child nodes behave when setting visibility.

Since
100.4

◆ name

- (NSString*) name
readwritenonatomiccopyinherited

The name of the KML node.

Since
100.4

◆ nodeDescription

- (NSString*) nodeDescription
readwritenonatomiccopyinherited

The description of the KML node.

Since
100.4

◆ nodeID

- (NSString*) nodeID
readwritenonatomiccopyinherited

The ID of the KML node.

Since
100.5

◆ open

- (BOOL) open
readwritenonatomicassign

Indicates whether the node representing this network link in a table of contents view should be displayed expanded or open.

Since
100.4

◆ parentNode

- (AGSKMLNode*) parentNode
readnonatomicstronginherited

The KML node's parent or nil if the node is a root node.

Since
100.4

◆ partiallyVisible

- (BOOL) partiallyVisible
readnonatomicassign

Indicates whether the KML nodes in this container have mixed visibility.

Since
100.4

◆ refreshError

- (NSError*) refreshError
readnonatomicstronginherited

The error that was encountered during the most recent KML node refresh operation. Will be nil if the operation succeeded. The refresh error changes can be monitored using Key-Value Observing (KVO).

Since
100.4

◆ refreshInterval

- (NSTimeInterval) refreshInterval
readwritenonatomicassign

The KML network link refresh interval, in seconds.

See also
AGSKMLRefreshMode
Since
100.6

◆ refreshMode

- (AGSKMLRefreshMode) refreshMode
readwritenonatomicassign

The KML network link refresh mode.

See also
AGSKMLRefreshMode, AGSKMLNetworkLink::refreshInterval
Since
100.6

◆ refreshStatus

- (AGSKMLRefreshStatus) refreshStatus
readnonatomicassigninherited

The refresh status of the KML node. The refresh status changes can be monitored using Key-Value Observing (KVO). Use this to update the node's properties and application UI. Please take following actions for different refresh statuses, AGSKMLRefreshStatusNone - No action required. AGSKMLRefreshStatusInProgress - Application may show an appropriate UI, such as a spinning wheel on top of the node's table of contents (TOC) icon to indicate in progress status and to restrict user interaction with the node. AGSKMLRefreshStatusCompleted - Read and update the node's properties and its children. The AGSKMLNetworkLink::childNodes changes can be monitored using Key-Value Observing (KVO). AGSKMLRefreshStatusFailed - Check refreshError to get the reason for failure and show the error message. Also, applications may show an appropriate UI cue such as a red X with the node's TOC icon to indicate the failed status.

Since
100.4

◆ snippet

- (NSString*) snippet
readwritenonatomiccopyinherited

The KML node's snippet, if specified.

Note
A snippet is a short description that can optionally be specified for a KML Feature, either instead of or in addition to a full description.
Since
100.4

◆ snippetMaxLines

- (NSInteger) snippetMaxLines
readwritenonatomicassigninherited

The maximum number of lines of snippet to be shown in the UI.

Note
If no snippet is specified for the node, a short description can be created by taking the first few lines of the description.
Since
100.4

◆ style

- (AGSKMLStyle*) style
readwritenonatomicstronginherited

The KML node's style.

See also
AGSKMLStyle
Since
100.6

◆ timeExtent

- (AGSTimeExtent*) timeExtent
readwritenonatomicstronginherited

The KML node's time extent.

Represents the AGSTimeExtent equivalent of a KML node's TimeStamp or TimeSpan. An AGSKMLContainer node such as AGSKMLDocument or AGSKMLFolder may have its own AGSTimeExtent independent of its child nodes. All KML TimeStamps and TimeSpans specified in a KML/KMZ file are converted to their UTC AGSTimeExtent equivalents.

Examples:

KML TimeStamp AGSTimeExtent::startTime AGSTimeExtent::endTime
2021 2021-01-01T00:00:00 2021-12-31T23:59:59
2021-01 2021-01-01T00:00:00 2021-01-31T23:59:59
2021-01-01 2021-01-01T00:00:00 2021-01-01T23:59:59
2021-01-01T12:34:56 2021-01-01T12:34:56 2021-01-01T12:34:56
KML TimeSpan AGSTimeExtent::startTime AGSTimeExtent::endTime
2021 - 2022 2021-01-01T00:00:00 2022-12-31T23:59:59
2021-01 - 2021-02 2021-01-01T00:00:00 2021-02-28T23:59:59
No beginning - 2021 Infinite start time 2021-12-31T23:59:59
2021 - No end 2021-01-01T00:00:00 Infinite end time
See also
AGSTimeExtent
Since
100.11

◆ URL

- (NSURL*) URL
readwritenonatomicstrong

The URL of the KML network link. After setting a new URL, call refresh to get the new data. If the refresh mode of the network link is AGSKMLRefreshModeOnInterval when the URL is changed, the refresh operation executed on the following interval will use the new URL value.

Since
100.4

◆ UXIcon

- (AGSImage*) UXIcon
readnonatomicstronginherited

The KML node's UX icon. Use this icon to represent the KML node in the table of contents (TOC) or anywhere else you need to display the node in the UI. The icon changes can be monitored using Key-Value Observing (KVO).

Note
The icon can change during the lifetime of the node.
Since
100.4

◆ UXIconColor

- (AGSColor*) UXIconColor
readnonatomicstronginherited

The color mask that can be used to blend the image associated with UXIcon. Pixels in the image are multiplied by this color channel-by-channel.

Note
When no icon is specified (UXIcon is nil), you can use the icon color to draw a placeholder image in the UI (for example, the TOC).
Runtime does not pre-tint the UXIcon; it is the application's responsibility to tint the image before displaying it.
Since
100.4

◆ UXIconID

- (NSInteger) UXIconID
readnonatomicassigninherited

The ID of KML node's UX icon.

Since
100.4

◆ viewpoint

- (AGSKMLViewpoint*) viewpoint
readwritenonatomicstronginherited

The KML node's viewpoint, or nil if no Camera or LookAt viewpoint is specified on the node. It specifies the vantage point for looking at the node. This can be used to show a particular node in the view (for example, if a user selected it in a TOC).

Note
You can convert from a KML viewpoint to a Runtime viewpoint in order to use it with a GeoView. See the guide documentation and samples for details.
Since
100.4

◆ viewRefreshMode

- (AGSKMLViewRefreshMode) viewRefreshMode
readwritenonatomicassign

The KML network link view refresh mode.

See also
AGSKMLViewRefreshMode, AGSKMLNetworkLink::viewRefreshTime
Since
100.6

◆ viewRefreshTime

- (NSTimeInterval) viewRefreshTime
readwritenonatomicassign

The KML network link view refresh time, in seconds.

See also
AGSKMLViewRefreshMode
Since
100.6

◆ visible

- (BOOL) visible
readwritenonatomicassigninherited

Indicates whether the KML node is visible or not.

Note
In order for a node to be visible, the visibility of the node and all ancestors must be true. Changing the visibility of one node may affect the other nodes in the dataset's node hierarchy, including child nodes.
Since
100.4