SuperMap.Layer.XYZ

The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.

Inherits from

Summary
SuperMap.Layer.XYZ The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.
Properties
isBaseLayer Default is true, as this is designed to be a base tile source.
serverResolutions {Array} A list of all resolutions available on the server.
sphericalMercator Whether the tile extents should be set to the defaults for spherical mercator.
zoomOffset {Number} If your cache has more zoom levels than you want to provide access to with this layer, supply a zoomOffset.
Constructor
SuperMap.Layer.XYZ
Functions
clone Create a clone of this layer
setMap When the layer is added to a map, then we can fetch our origin (if we don’t have one.)

Properties

isBaseLayer

Default is true, as this is designed to be a base tile source.

sphericalMercator

Whether the tile extents should be set to the defaults for spherical mercator.  Useful for things like OpenStreetMap.  Default is false, except for the OSM subclass.

zoomOffset

{Number} If your cache has more zoom levels than you want to provide access to with this layer, supply a zoomOffset.  This zoom offset is added to the current map zoom level to determine the level for a requested tile.  For example, if you supply a zoomOffset of 3, when the map is at the zoom 0, tiles will be requested from level 3 of your cache.  Default is 0 (assumes cache level and map zoom are equivalent).  Using zoomOffset is an alternative to setting serverResolutions if you only want to expose a subset of the server resolutions.

serverResolutions

{Array} A list of all resolutions available on the server.  Only set this property if the map resolutions differ from the server.  This property serves two purposes.  (a) serverResolutions can include resolutions that the server supports and that you don’t want to provide with this layer; you can also look at zoomOffset, which is an alternative to serverResolutions for that specific purpose.  (b) The map can work with resolutions that aren’t supported by the server, i.e. that aren’t in serverResolutions.  When the map is displayed in such a resolution data for the closest server-supported resolution is loaded and the layer div is stretched as necessary.

Constructor

SuperMap.Layer.XYZ

Parameters

name {String}
url {String}
options {Object} Hashtable of extra options to tag onto the layer

Functions

clone

clone: function ( obj )

Create a clone of this layer

Parameters

obj {Object} Is this ever used?

Returns

{SuperMap.Layer.XYZ} An exact clone of this SuperMap.Layer.XYZ

setMap

setMap: function( map )

When the layer is added to a map, then we can fetch our origin (if we don’t have one.)

Parameters

map {SuperMap.Map}
clone: function ( obj )
Create a clone of this layer
setMap: function( map )
When the layer is added to a map, then we can fetch our origin (if we don’t have one.)
使用网格状瓦片图层的基类,{SuperMap.Layer.Grid}构造函数可创建新的网格瓦片图层。
{Number} If your cache has more zoom levels than you want to provide access to with this layer, supply a zoomOffset.
{Array} A list of all resolutions available on the server.
地图类。 用于实例化map类创建一个新地图,实现地图在客户端的交互操作,可通过给创建的map添加图层和控件来扩展应用, 在创建地图时,如果没有添加指定的控件,则默认Navigation、PanZoomBar控件。
Close