TileInfo constructor
- required int dpi,
- required TileImageFormat format,
- required List<
LevelOfDetail> levelsOfDetail, - required ArcGISPoint origin,
- required SpatialReference spatialReference,
- required int tileHeight,
- required int tileWidth,
Create tile information.
Parameters:
dpi
— The DPI of each tile.format
— The format of each tile.levelsOfDetail
— A List of LevelOfDetail. Contents of the List are copied.origin
— The origin of the tiles.spatialReference
— The spatial reference of the tiles.tileHeight
— Height of a tile, in pixels.tileWidth
— Width of a tile, in pixels.
Implementation
factory TileInfo({
required int dpi,
required TileImageFormat format,
required List<LevelOfDetail> levelsOfDetail,
required ArcGISPoint origin,
required SpatialReference spatialReference,
required int tileHeight,
required int tileWidth,
}) {
_initializeArcGISEnvironmentIfNeeded();
final coreLevelsOfDetail = levelsOfDetail.toArray(
valueType: _ElementType.levelOfDetail,
);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_TileInfo_createWith(
dpi,
format.coreValue,
coreLevelsOfDetail._handle,
origin._handle,
spatialReference._handle,
tileHeight,
tileWidth,
errorHandler,
);
});
final TileInfo object = TileInfo._withHandle(handle);
object._levelsOfDetail.value.setCache(levelsOfDetail);
object._spatialReference.cache(spatialReference);
return object;
}