WebTiledLayer constructor
Creates a web tiled layer with the given URI template, sub-domain collection, tiling scheme information, and extent.
Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. The URI template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:
- "subDomain" is one of the strings in the subDomains list.
- "level" corresponds to a zoom level.
- "col" represents the column of the tile.
- "row" represents the row of the tile.
The subDomains collection must contain at least 1 string value to use the "subDomain" key in the URI template. The URI should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).
Parameters:
template
— A URI template for tile requests.subDomains
— A collection of strings listing available sub-domains.tileInfo
— The tiling scheme info.fullExtent
— The full extent of tiles in the cache or server.
Implementation
factory WebTiledLayer({
required String template,
List<String> subDomains = const [],
TileInfo? tileInfo,
Envelope? fullExtent,
}) {
_initializeArcGISEnvironmentIfNeeded();
final coreTemplate = _CString(template);
final coreSubDomains = subDomains.toMutableArray(
valueType: _ElementType.string,
);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_WebTiledLayer_createWithUriCombined(
coreTemplate.bytes,
coreSubDomains._handle,
tileInfo?._handle ?? ffi.nullptr,
fullExtent?._handle ?? ffi.nullptr,
errorHandler,
);
});
final WebTiledLayer object = Layer._instanceCache.instanceWith(handle);
object._template.cache(template);
object._subDomains.value.setCache(subDomains);
object._tileInfo.cache(tileInfo);
return object;
}