A base class for all image tiled layers that fetches map tiles from a remote service. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.1 |
Inherits: | |
Inherited By: |
Properties
- credential : Credential
- requestConfiguration : RequestConfiguration
- tileUrlCallback : var
- url : url
Signals
Methods
- void setTileUrl(TileKey tileKey, string url)
Detailed Description
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
Note: the following default properties apply to all subclasses.
Type | Default Property |
---|---|
RequestConfiguration | requestConfiguration |
Credential | credential |
The properties fullExtent and tileInfo must be defined to create a ServiceImageTiledLayer.
Creating a custom service image tiled layer
When tiles are to be fetched from a remote service, a request is made to obtain the tile's URL based on the geographic location. The custom service image tiled layer must then supply the correct URL for the tile. The URL must be a valid online image URL. If the URL is not valid or if the image format does not match the tile info, ServiceImageTiledLayer will emit an error.
The tileInfo property defines the format of requested images (image format, DPI, width and height) returned by a remote service, the limits of extent, and scale factor for requests.
You can supply a JavaScript callback function for the tileUrlCallback property which defines how the URL for a given tile request should be formed:
ServiceImageTiledLayer { id: customTiledLayer fullExtent: Envelope { ... } tileInfo: TileInfo { ... } // supply JavaScript callback to return specific tile URL tileUrlCallback: function(level, row, column) { var requestUrl = ("https://myTileServiceUrl/" + level +"/" + column + "/" + row + ".png"); return requestUrl; } }
Note: Network requesting, downloading images and rendering are done internally.
See also Cancelable, LayerContent, RemoteResource, Loadable, Envelope, TileInfo, TileInfo, and TileKey.
Property Documentation
[default] credential : Credential |
The security credential used to access the layer.
Only applicable if the service is secured.
[default] requestConfiguration : RequestConfiguration |
The configuration parameters used for network requests sent by this layer.
The JavaScript callback function that is called when a tile is requested.
The callback can make use of 3 JavaScript arguments and should return the URL of the tile to be returned:
- level.
- row.
- column.
This property was introduced in Esri.ArcGISRuntime 100.2.
See also TileKey.
Not used for ServiceImageTiledLayer.
Signal Documentation
Emitted when the credential property changes.
Note: The corresponding handler is onCredentialChanged
.
Emitted when the requestConfiguration property changes.
Note: The corresponding handler is onRequestConfigurationChanged
.
Emitted when the tileUrlCallback property changes.
Note: The corresponding handler is onTileUrlCallbackChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.2.
Method Documentation
void setTileUrl(TileKey tileKey, string url) |
Sets the url to an online image corresponding to a tileKey.