Queries and returns feature geometry and associated hyperlink URL for visible layers within a defined map extent.
QueryHyperlinks(MapDescription MapDescription, ImageDisplay MapImageDisplay, int[] LayerIDs)
Parameter |
Description |
MapDescription |
Used to define the map extent and visibility of layers. |
ImageDisplay |
Used to determine whether layers are visible or not based on the current map scale. |
LayerIDs |
An array of layers ids for layers to search. Only visible layers are searched. If empty or null, all layers can be searched. |
Return Value
An array of MapServerHyperlink objects, one for each feature that has a hyperlink URL. These objects store the feature geometry and the URL.
Remarks
A feature layer within a map service must enable hyperlinks by specifying the field that contains the hyperlink URL. No validation is done to ensure that the field contains a URL, thus any string value can be provided. As a result, the hyperlink field can contain a raw URL ("http://www.esri.com") or the HTML representation of a URL("<a href='http://www.esri.com'>ESRI</a>"). If a feature layer has enabled hyperlinks and the field containing the hyperlink content is empty, no MapServerHyperlink object will be returned.
Layer visibility depends on whether the layer is on or off (the Visible property on a layers LayerDescription) or whether the layer is on, but not visible due to scale dependencies. Each layer maintains a LayerDescription available via the MapDescription.LayerDescriptions array. Scale dependency for a layer is available via the MinScale and MaxScale properties on MapLayerInfo, available via the MapServerInfo.MapLayerInfos array. The ImageDisplay parameter is used to determine layer visibility based on scale dependencies.
The amount of information (e.g. number of MapServerHyperlink objects) returned from a call to the this method may be restricted by the map service. The default maximum value for the number of results returned is 500. If 600 records are matched, only the first 500 results will be returned. You will be unable to access the remaining 100 records. The maximum number of results cannot be changed via the ArcGIS Server SOAP API. The map service itself must be configured to return more results, if necessary.
Examples