Class: esri/layers/support/TileInfo
Inheritance: TileInfo Accessor
Since: ArcGIS API for JavaScript 4.0

Contains information about the tiling scheme for TileLayers, ElevationLayers and WebTileLayers.

See also:

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
Number

The dots per inch (DPI) of the tiling scheme.

more details
more detailsTileInfo
String

Image format of the cached tiles.

more details
more detailsTileInfo
Boolean

Indicates if the tiling scheme supports wrap around.

more details
more detailsTileInfo
LOD[]

An array of levels of detail that define the tiling scheme.

more details
more detailsTileInfo
Point

The tiling scheme origin.

more details
more detailsTileInfo
Number[]

Size of tiles in pixels.

more details
more detailsTileInfo
SpatialReference

The spatial reference of the tiling schema.

more details
more detailsTileInfo

Property Details

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

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

isWrappableBoolean
Since: 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.

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

NameReturn TypeSummaryClass
TileInfo

A convenience method used to create a new TileInfo instance with preset properties like LODs.

more details
more detailsTileInfo
*

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 detailsTileInfo
Number

Utility method used to convert a scale value to its corresponding zoom value.

more details
more detailsTileInfo
Object

Converts an instance of this class to its ArcGIS portal JSON representation.

more details
more detailsTileInfo
Number

Utility method used to convert a zoom value to its corresponding scale value.

more details
more detailsTileInfo

Method Details

create(options){TileInfo}static

A convenience method used to create a new TileInfo instance with preset properties like LODs. Optionally, properties such as size, scales[], and a SpatialReference can also be set to calculate LODs for each TileInfo.

Parameters:
options Object
optional

An object that contains the size, scales, and/or SpatialReference used to compute the new TileInfo instance.

Specification:
size Number
optional
Default Value: 256

The size of each tile in pixels.

spatialReference SpatialReference
optional
Default Value: WebMercator

The 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[]
optional
Default Value: The scales provided by ArcGIS Online basemaps

An 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:
TypeDescription
TileInfoA 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 Object

A 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:
TypeDescription
*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 Number

The scale value to convert.

Returns:
TypeDescription
NumberThe 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:
TypeDescription
ObjectThe ArcGIS portal JSON representation of an instance of this class.
zoomToScale(zoom){Number}

Utility method used to convert a zoom value to its corresponding scale value.

Parameter:
zoom Number

The zoom value to convert.

Returns:
TypeDescription
NumberThe returned scale value.

API Reference search results

NameTypeModule
Loading...