TileInfo
esri/layers/support/TileInfo
Contains information about the tiling scheme for TileLayers, ElevationLayers and WebTileLayers.
- See also:
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
Number | The dots per inch (DPI) of the tiling scheme. more details | more details | TileInfo | |
String | Image format of the cached tiles. more details | more details | TileInfo | |
Boolean | Indicates if the tiling scheme supports wrap around. more details | more details | TileInfo | |
LOD[] | An array of levels of detail that define the tiling scheme. more details | more details | TileInfo | |
Point | The tiling scheme origin. more details | more details | TileInfo | |
Number[] | Size of tiles in pixels. more details | more details | TileInfo | |
SpatialReference | The spatial reference of the tiling schema. more details | more details | TileInfo |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
- dpiNumber
The dots per inch (DPI) of the tiling scheme.
- formatString
Image format of the cached tiles.
Possible Values: png | png24 | png32 | jpg | dib | tiff | emf | ps | pdf | gif | svg | svgz | mixed | lerc
- isWrappableBooleanSince: ArcGIS API for JavaScript 4.5
Indicates if the tiling scheme supports wrap around.
- Autocasts from Object[]
An array of levels of detail that define the tiling scheme.
The tiling scheme origin.
- sizeNumber[]
Size of tiles in pixels.
Example:// sets the height and width of each tile to [ 256, 256 ] tileInfo.size = 256;
- spatialReferenceSpatialReferenceautocast
The spatial reference of the tiling schema.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
TileInfo | A convenience method used to create a new TileInfo instance with preset properties like LODs. more details | more details | TileInfo | |
* | Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. more details | more details | TileInfo | |
Number | Utility method used to convert a scale value to its corresponding zoom value. more details | more details | TileInfo | |
Object | Converts an instance of this class to its ArcGIS portal JSON representation. more details | more details | TileInfo | |
Number | Utility method used to convert a zoom value to its corresponding scale value. more details | more details | TileInfo |
Method Details
A convenience method used to create a new TileInfo instance with preset properties like LODs. Optionally, properties such as
size
,scales[]
, and aSpatialReference
can also be set to calculate LODs for each TileInfo.Parameters:options ObjectoptionalAn object that contains the size, scales, and/or SpatialReference used to compute the new TileInfo instance.
Specification:size NumberoptionalDefault Value: 256The size of each tile in pixels.
spatialReference SpatialReferenceoptionalDefault Value: WebMercatorThe spatial reference for the new TileInfo instance. If the spatial reference is not WGS84 nor WebMercator, the origin of the TileInfo is
0.0
.scales Number[]optionalDefault Value: The scales provided by ArcGIS Online basemapsAn array of scale values to use for the TileInfo. If none are specified, the scales from the ArcGIS Online basemaps are used from level 0 through 24.
Returns:Type Description TileInfo A new TileInfo instance. The scales determine what LODs to create. The DPI defaults to 96 and currently cannot be modified. - See also:
Example:// This snippet shows how to create a TileInfo instance using the default // settings and passing its resulting LOD's to a MapView's constraints var view = new MapView({ container: "viewDiv", map: map, constraints: { lods: TileInfo.create().lods } });
- fromJSON(json){*}static
Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input
json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns:Type Description * Returns a new instance of this class.
- scaleToZoom(scale){Number}
Utility method used to convert a scale value to its corresponding zoom value.
Parameter:scale NumberThe scale value to convert.
Returns:Type Description Number The returned zoom value.
- toJSON(){Object}
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() topic in the Guide for more information.
Returns:Type Description Object The ArcGIS portal JSON representation of an instance of this class.