Description
Allows you to work with a cached map service resource exposed by the ArcGIS Server REST API. A cached service accesses tiles from a cache instead of dynamically rendering images. For dynamic map services, see
DynamicMapServiceLayer.
Class hierarchy
esri.layers.Layer
|_ esri.layers.TiledMapServiceLayer
|_ esri.layers.ArcGISTiledMapServiceLayer
Constructor
Properties
| copyright |
String
|
Copyright string as defined by the map service. |
| description |
String
|
Map description as defined by the map service. |
| layerInfos |
LayerInfo[]
|
Returns the available layers in service and their default visibility. |
| units |
String
|
Default units of the layer as defined by the service. If the layer is the base map, the map is in these units. |
Constructor Detail
esri.layers.ArcGISTiledMapServiceLayer(url, options?)
Creates a new ArcGISTiledMapServiceLayer object. A URL is a required parameter. This layer also takes some optional parameters. These optional parameters can be included in any order.
Parameters:
|
<String>
url |
Required |
URL to the ArcGIS Server REST resource at represents a map service. An example is
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapServer. For more information on constructing a URL, see The Services Directory and the REST API.
|
|
<Object>
options |
Optional |
Optional parameters. See options list.
|
Options:
|
<Number>
displayLevels |
Lists which levels to draw. (As of v1.2)
In the following example, assume you have two layers. The first layer is an ArcGIS Online Street Map layer, and you want to use only levels 0 through 7. You also have a second layer with more recent street data that you want to use for levels 8 through 12.
var agoServiceURL = "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer";
var agoLayer = new esri.layers.ArcGISTiledMapServiceLayer(agoServiceURL, { displayLevels:[0,1,2,3,4,5,6,7]});
map.addLayer(agoLayer);
var myServiceURL = "http://myserver/ArcGIS/rest/services/myservice/MapServer";
var myLayer = new esri.layers.ArcGISTiledMapServiceLayer(myServiceURL, { displayLevels:[8,9,10,11,12]});
map.addLayer(myLayer);
|
|
<String>
id |
Id to assign to the layer. If not assigned, esri.Map assigns value.
|
|
<Number>
opacity |
Initial opacity or transparency of layer. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency. The default value is 1.0.
|
|
<String[]>
tileServers |
Array of REST endpoints that can be used to retrieve tile images. (As of v1.1)
|
|
<Boolean>
visible |
Initial visibility of the layer. The default value is true.
|
Properties Detail
Copyright string as defined by the map service.
Map description as defined by the map service.
Returns the available layers in service and their default visibility.
Default units of the layer as defined by the service. If the layer is the base map, the map is in these units.