@mapgis/webclient-common
Version:
mapgis ES6 format for igserver
3,253 lines (1,202 loc) • 131 kB
HTML
<header id="page-title" class="page-title">
<span class="page-title-main">类名</span>
<span class="page-title-sub">WebTileLayer</span>
</header>
<section>
<article>
<div class="container-overview">
<div class='vertical-section'>
<div class="members">
<div class="member">
<h4 class="name" id="WebTileLayer">
<a class="href-link" href="#WebTileLayer">#</a>
<span class="code-name" id="WebTileLayer" style="font-size:30px">
new WebTileLayer<span class="signature">(options)</span>
</span>
</h4>
<div class="description">
<p>网络瓦片图层,<br>
支持加载任意网络地图服务,<br/>
服务的格式必须为:<br/>
http://{任意字符串}{col}{任意字符串}{row}{任意字符串}{level}<br/>
以天地图的DataServer服务为例,其服务地址必须是如下形式:<br/>
http://t5.tianditu.com/DataServer?T=vec_w&x={col}&y={row}&l={level}<br/>
会将基地址中的{col}替换为列号,{row}替换为行号,{level}替换为级数<br/>
需要注意:<br/>
1、默认是标准的经纬度裁图坐标系(4326),默认支持的坐标系有地理坐标系和Web墨卡托坐标系<br/>
2、如果是上述坐标系,但是坐标系的分辨率有所改变,因此不是标准的地理坐标系和Web墨卡托坐标系;或者不是上述坐标系,请自行构造TileInfo、Extent、SpatialReference等参数,来创建图层<br/>
<br><br>[ES5引入方式]:<br/>
zondy.layer.WebTileLayer() <br/>
[ES6引入方式]:<br/>
import { WebTileLayer } from "@mapgis/webclient-common" <br/>
<br/>
针对图层的操作请在图层加载完毕事件中进行<br/>
Layer.on('layerview-created', function (result) {<br/>
console.log("加载完毕:", result.layer)<br/>
});<br/>
如果不想在该事件中放入业务代码,则请确认图层资源已加载完毕后再进行操作<br/>
if(layer.loadStatus === 'loaded') {<br/>
// 你的业务逻辑<br/>
}</p>
</div>
<h4>参数</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th style="min-width: 100px;">默认值</th>
<th class="last">描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">
Object
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>构造参数</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">
String
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>服务基地址,格式为:<br/>
http://{任意字符串}{col}{任意字符串}{row}{任意字符串}{level}<br/>
会将{col}替换为列号,将{row}替换为行行号,将{level}替换为级数<br/></p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">
String
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>图层id,不给则给一个随机的id</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>opacity</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="default">
1
</td>
<td class="description last"><p>图层透明度,0到1之间的值,0为完全透明,1为不透明,参考示例:<a href='#opacity'>[设置图层透明度]</a></p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>visible</code></td>
<td class="type">
<span class="param-type">
Boolean
</span>
</td>
<td class="default">
true
</td>
<td class="description last"><p>图层显示或隐藏,true则显示,false则隐藏,参考示例:<a href='#visible'>[设置图层显示或隐藏]</a></p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>spatialReference</code></td>
<td class="type">
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" href="SpatialReference.html">SpatialReference</a>
</span>
</td>
<td class="default">
new SpatialReference({wkid:4326})
</td>
<td class="description last"><p>图层坐标系,默认为4326坐标系,也可自行指定坐标系</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>extent</code></td>
<td class="type">
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>图层范围,当坐标系为地理坐标系或者Web墨卡托坐标系时,地图范围默认为全球范围,也可自行指定范围</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>tileInfo</code></td>
<td class="type">
<span class="param-type">
<a link="TileInfo.html" onclick="getTypeHTML(event)" href="TileInfo.html">TileInfo</a>
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>瓦片信息,当坐标系为地理坐标系或者Web墨卡托坐标系时,默认会自动计算瓦片信息,也可自行计算并设置瓦片信息</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>minScale</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="default">
0
</td>
<td class="description last"><p>最小显示比例尺,图层在视图中可见的最小比例尺。</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>maxScale</code></td>
<td class="type">
<span class="param-type">
Number
</span>
</td>
<td class="default">
0
</td>
<td class="description last"><p>最大显示比例尺,图层在视图中可见的最大比例尺。</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>tileSliceType</code></td>
<td class="type">
<span class="param-type">
<a link="TileSliceType.html" onclick="getTypeHTML(event)" href="global.html#TileSliceType">TileSliceType</a>
</span>
</td>
<td class="default">
'wmts'
</td>
<td class="description last"><p>瓦片的切片方式。支持TMS和WMTS两种切片方式的瓦片加载,默认为wmts切片方式。关于tms裁图可以参考[https://en.wikipedia.org/wiki/Tile_Map_Service]</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>subDomains</code></td>
<td class="type">
<span class="param-type">
Array.<String>
</span>
</td>
<td class="default">
[]
</td>
<td class="description last"><p>子域名占位符,用于加快瓦片索引的速度。如果指定此值,则URL内必须包含{s}作为替换的模板</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>tokenKey</code></td>
<td class="type">
<span class="param-type">
String
</span>
</td>
<td class="default">
'token'
</td>
<td class="description last"><p>token名</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>tokenValue</code></td>
<td class="type">
<span class="param-type">
String
</span>
</td>
<td class="default">
</td>
<td class="description last"><p>token值,只有当tokenValue存在时,才会绑定token</p></td>
</tr>
<tr class="deep-level-1">
<td class="name"><code>clippingArea</code></td>
<td class="type">
<span class="param-type">
<a link="Polygon.html" onclick="getTypeHTML(event)" href="Polygon.html">Polygon</a>
</span>
|
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
|
<span class="param-type">
<a link="Circle.html" onclick="getTypeHTML(event)" href="Circle.html">Circle</a>
</span>
|
<span class="param-type">
<a link="MultiPolygon.html" onclick="getTypeHTML(event)" href="MultiPolygon.html">MultiPolygon</a>
</span>
|
<span class="param-type">
null
</span>
</td>
<td class="default">
null
</td>
<td class="description last"><p>图层空间裁剪范围,仅支持多多边形裁剪、多边形裁剪、矩形裁剪、圆形裁剪</p></td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
</dl>
<div class="method-parameter columns">
<div class="column is-2"><label>绑定事件</label></div>
<div class="column is-10">
<ul>
<li><a href="#图层加载完毕事件">图层加载完毕事件</a></li>
<li><a href="#图层销毁完毕事件">图层销毁完毕事件</a></li>
<li><a href="#图层更新完毕事件">图层更新完毕事件</a></li>
<li><a href="#图层显隐更新完毕事件">图层显隐更新完毕事件</a></li>
<li><a href="#图层透明度更新完毕事件">图层透明度更新完毕事件</a></li>
<li><a href="#图层顺序更新完毕事件">图层顺序更新完毕事件</a></li>
<li><a href="#图层刷新完毕事件">图层刷新完毕事件</a></li>
</ul>
</div>
</div>
<p class="summary"><h5>支持如下方法:</h5>
<a href='#load'>[1、加载图层资源]</a><br/>
<a href='#getTileUrl'>[2、根据级数以及行列号获取瓦片的url]</a><br/>
<a href='#toJSON'>[3、将图层转为json对象]</a><br/>
<a href='#fromJSON'>[4、通过传入的json构造并返回一个新的几何对象]</a><br/>
<a href="OGCLayer.html#toJSON"><code>5、导出为json对象</code></a><br/>
<a href="OGCLayer.html#clone"><code>6、克隆几何对象</code></a></p>
<h5>示例</h5>
<p class="code-caption"><h7 id='DataServer'>加载天地图的DataServer服务</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { SpatialReference } = zondy
const { WebTileLayer} = zondy.layer
// ES6引入方式
import { WebTileLayer, SpatialReference } from "@mapgis/webclient-common"
const webTileLayer = new WebTileLayer({
// 服务基地址
url: 'http://t5.tianditu.com/DataServer?T=cva_w&x={col}&y={row}&l={level}',
// 设置坐标系
spatialReference: new SpatialReference({wkid: 3857})
});</code></pre>
<p class="code-caption"><h7 id='opacity'>设置图层透明度</h7></p>
<pre class="prettyprint"><code>// ES5引入方式
const { WebTileLayer} = zondy.layer
// ES6引入方式
import { WebTileLayer } from "@mapgis/webclient-common"
// 初始化时设置
const webTileLayer = new WebTileLayer({
// 服务基地址
url: 'http://{任意字符串}{col}{任意字符串}{row}{任意字符串}{level}',
// 设置图层透明度
opacity: 1.0
});
// 加载完成后设置
arcgisTileLayer.on('layerview-created', function (result) {
console.log("加载完毕:", result.layer)
webTileLayer.opacity = 0.5
})</code></pre>
<p class="code-caption"><h7 id='visible'>设置图层显示或隐藏</h7></p>
<pre class="prettyprint"><code>* // ES5引入方式
const { WebTileLayer} = zondy.layer
// ES6引入方式
import { WebTileLayer } from "@mapgis/webclient-common"
// 初始化时设置
const webTileLayer = new WebTileLayer({
// 服务基地址
url: 'http://{任意字符串}{col}{任意字符串}{row}{任意字符串}{level}',
// 设置图层显示或隐藏
visible: true
});
// 加载完成后设置
arcgisTileLayer.on('layerview-created', function (result) {
console.log("加载完毕:", result.layer)
// 设置图层显示或隐藏
webTileLayer.visible = !webTileLayer.visible
})</code></pre>
<p class="code-caption"><h7 id='remove-layer'>删除图层</h7></p>
<pre class="prettyprint"><code>map.remove(webTileLayer)</code></pre>
<p class="code-caption"><h7 id='index'>图层顺序</h7></p>
<pre class="prettyprint"><code>// 加载完毕后,更改图层顺序
map.reorder(webTileLayer, '要移动到的index');</code></pre>
</div>
</div>
</div>
</div>
<h3 class="subsection-title">继承关系</h3>
<ul>
<li><a link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html">Layer</a></li>
</ul>
<div class='vertical-section'>
<h3 id='member'>成员变量</h3>
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量概述</h4>
<div class="table-container">
<table class="params table">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code><a href="#copyright">copyright</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>版权所有</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#description">description</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>图层描述</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#extendProps">extendProps</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>当前图层对象上不支持的属性,二次开发用户希望挂在图层对像上的属性可以存储到该属性中</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#extensionOptions">extensionOptions</a></code></td>
<td class="name">
<code>
<span class="param-type">
Object
</span>
</code>
</td>
<td class="name"><code><p>初始化图层的额外参数,可以通过该参数传入引擎原生的构造参数</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#extent">extent</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
</code>
</td>
<td class="name"><code><p>图层范围,仅显示范围中的内容,当坐标系是地理坐标系或者Web墨卡托坐标系是,会指定图层范围,若使用自定义坐标系,请自行指定图层范围,否则无法创建图层</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#extent">extent</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
</code>
</td>
<td class="name"><code><p>瓦片大小,默认为256,当使用自定义坐标系时,请在TileInfo中指定瓦片大小,否则无法创建图层</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#headers">headers</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>设置服务请求头</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#httpMethod">httpMethod</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="FetchMethod.html" onclick="getTypeHTML(event)" href="global.html#FetchMethod">FetchMethod</a>
</span>
</code>
</td>
<td class="name"><code><p>http请求方式</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#id">id</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>图层id</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#index">index</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>图层顺序</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#loaded">loaded</a></code></td>
<td class="name">
<code>
<span class="param-type">
Boolean
</span>
</code>
</td>
<td class="name"><code><p>是否加载完毕</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#loadStatus">loadStatus</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>图层加载状态</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#maxScale">maxScale</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>最大显示比例尺,图层在视图中可见的最大比例尺(最放大)。如果地图被放大到超过这个比例,图层将不可见。默认值为0,0表示图层没有最大比例尺、可见性不受最大比例尺限制。maxScale应该始终小于minScale。</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#minScale">minScale</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>最小显示比例尺,图层在视图中可见的最小比例尺(最缩小)。如果地图被缩小到超过这个比例,图层将不可见。默认值为0,0表示图层没有最小比例尺、可见性不受最小比例尺限制。minScale应该始终大于maxScale。</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#opacity">opacity</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>图层透明度,0到1之间的值,0为完全透明,1为不透明,会触发图层更新完毕事件。IGSSceneLayer图层类型为地形时,不支持该属性。</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#spatialReference">spatialReference</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" href="SpatialReference.html">SpatialReference</a>
</span>
</code>
</td>
<td class="name"><code><p>图层坐标系,不指定,则使用经纬度坐标系,如果是其他坐标系,请自行创建并指定坐标系参数,否则无法创建图层</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#subDomains">subDomains</a></code></td>
<td class="name">
<code>
<span class="param-type">
Array.<String>
</span>
</code>
</td>
<td class="name"><code><p>子域名占位符,用于加快瓦片索引的速度。如果指定此值,则URL内必须包含{s}作为替换的模板</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#tileInfo">tileInfo</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="TileInfo.html" onclick="getTypeHTML(event)" href="TileInfo.html">TileInfo</a>
</span>
</code>
</td>
<td class="name"><code><p>瓦片信息,用来构造图层坐标系,如果是自定义坐标系,请自行创建瓦片信息,否则无法创建图层</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#tileSliceType">tileSliceType</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="TileSliceType.html" onclick="getTypeHTML(event)" href="global.html#TileSliceType">TileSliceType</a>
</span>
</code>
</td>
<td class="name"><code><p>瓦片的切片方式。支持TMS和WMTS两种切片方式的瓦片加载,默认为wmts切片方式。关于tms裁图可以参考[https://en.wikipedia.org/wiki/Tile_Map_Service]</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#title">title</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>图层名称</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#tokenAttachType">tokenAttachType</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>token附加类型。默认psot请求优先附加到body,get请求优先附加到url末尾</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#tokenKey">tokenKey</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>token名</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#tokenValue">tokenValue</a></code></td>
<td class="name">
<code>
<span class="param-type">
String
</span>
</code>
</td>
<td class="name"><code><p>token值</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#type">type</a></code></td>
<td class="name">
<code>
<span class="param-type">
<a link="LayerType.html" onclick="getTypeHTML(event)" href="global.html#LayerType">LayerType</a>
</span>
</code>
</td>
<td class="name"><code><p>图层类型</p></code></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code><a href="#visible">visible</a></code></td>
<td class="name">
<code>
<span class="param-type">
Number
</span>
</code>
</td>
<td class="name"><code><p>图层显示或隐藏,true则显示,false则隐藏,会触发图层更新完毕事件</p></code></td>
</tr>
</tbody>
</table>
</div>
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量详情</h4>
<div class="members">
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="copyright">
<a class="href-link" href="#copyright">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
copyright
</span>
</h4>
<div class="description">
<p>版权所有</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="copyright" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#copyright">Layer#copyright</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="description">
<a class="href-link" href="#description">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
description
</span>
</h4>
<div class="description">
<p>图层描述</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="description" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#description">Layer#description</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Object
</span>
</span>
<h4 class="name" id="extendProps">
<a class="href-link" href="#extendProps">#</a>
<span class="code-name">
extendProps
</span>
</h4>
<div class="description">
<p>当前图层对象上不支持的属性,二次开发用户希望挂在图层对像上的属性可以存储到该属性中</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="extendProps" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#extendProps">Layer#extendProps</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>{}</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Object
</span>
</span>
<h4 class="name" id="extensionOptions">
<a class="href-link" href="#extensionOptions">#</a>
<span class="code-name">
extensionOptions
</span>
</h4>
<div class="description">
<p>初始化图层的额外参数,可以通过该参数传入引擎原生的构造参数</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="extensionOptions" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#extensionOptions">Layer#extensionOptions</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>{}</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
</span>
<h4 class="name" id="extent">
<a class="href-link" href="#extent">#</a>
<span class="code-name">
extent
</span>
</h4>
<div class="description">
<p>图层范围,仅显示范围中的内容,当坐标系是地理坐标系或者Web墨卡托坐标系是,会指定图层范围,若使用自定义坐标系,请自行指定图层范围,否则无法创建图层</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Layer.html#extent">Layer#extent</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="Extent.html" onclick="getTypeHTML(event)" href="Extent.html">Extent</a>
</span>
</span>
<h4 class="name" id="extent">
<a class="href-link" href="#extent">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
extent
</span>
</h4>
<div class="description">
<p>瓦片大小,默认为256,当使用自定义坐标系时,请在TileInfo中指定瓦片大小,否则无法创建图层</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Layer.html#extent">Layer#extent</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="headers">
<a class="href-link" href="#headers">#</a>
<span class="code-name">
headers
</span>
</h4>
<div class="description">
<p>设置服务请求头</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="headers" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#headers">Layer#headers</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="FetchMethod.html" onclick="getTypeHTML(event)" href="global.html#FetchMethod">FetchMethod</a>
</span>
</span>
<h4 class="name" id="httpMethod">
<a class="href-link" href="#httpMethod">#</a>
<span class="code-name">
httpMethod
</span>
</h4>
<div class="description">
<p>http请求方式</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="httpMethod" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#httpMethod">Layer#httpMethod</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="id">
<a class="href-link" href="#id">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
id
</span>
</h4>
<div class="description">
<p>图层id</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="id" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#id">Layer#id</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="index">
<a class="href-link" href="#index">#</a>
<span class="code-name">
index
</span>
</h4>
<div class="description">
<p>图层顺序</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="index" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#index">Layer#index</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Boolean
</span>
</span>
<h4 class="name" id="loaded">
<a class="href-link" href="#loaded">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
loaded
</span>
</h4>
<div class="description">
<p>是否加载完毕</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="loaded" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#loaded">Layer#loaded</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>false</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="loadStatus">
<a class="href-link" href="#loadStatus">#</a>
<span class='tag'>readonly</span>
<span class="code-name">
loadStatus
</span>
</h4>
<div class="description">
<p>图层加载状态</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="loadStatus" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#loadStatus">Layer#loadStatus</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>not-loaded</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="maxScale">
<a class="href-link" href="#maxScale">#</a>
<span class="code-name">
maxScale
</span>
</h4>
<div class="description">
<p>最大显示比例尺,图层在视图中可见的最大比例尺(最放大)。如果地图被放大到超过这个比例,图层将不可见。默认值为0,0表示图层没有最大比例尺、可见性不受最大比例尺限制。maxScale应该始终小于minScale。</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="maxScale" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#maxScale">Layer#maxScale</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>0</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="minScale">
<a class="href-link" href="#minScale">#</a>
<span class="code-name">
minScale
</span>
</h4>
<div class="description">
<p>最小显示比例尺,图层在视图中可见的最小比例尺(最缩小)。如果地图被缩小到超过这个比例,图层将不可见。默认值为0,0表示图层没有最小比例尺、可见性不受最小比例尺限制。minScale应该始终大于maxScale。</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="minScale" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#minScale">Layer#minScale</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>0</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Number
</span>
</span>
<h4 class="name" id="opacity">
<a class="href-link" href="#opacity">#</a>
<span class="code-name">
opacity
</span>
</h4>
<div class="description">
<p>图层透明度,0到1之间的值,0为完全透明,1为不透明,会触发图层更新完毕事件。IGSSceneLayer图层类型为地形时,不支持该属性。</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="opacity" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#opacity">Layer#opacity</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="SpatialReference.html" onclick="getTypeHTML(event)" href="SpatialReference.html">SpatialReference</a>
</span>
</span>
<h4 class="name" id="spatialReference">
<a class="href-link" href="#spatialReference">#</a>
<span class="code-name">
spatialReference
</span>
</h4>
<div class="description">
<p>图层坐标系,不指定,则使用经纬度坐标系,如果是其他坐标系,请自行创建并指定坐标系参数,否则无法创建图层</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Layer.html#spatialReference">Layer#spatialReference</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
Array.<String>
</span>
</span>
<h4 class="name" id="subDomains">
<a class="href-link" href="#subDomains">#</a>
<span class="code-name">
subDomains
</span>
</h4>
<div class="description">
<p>子域名占位符,用于加快瓦片索引的速度。如果指定此值,则URL内必须包含{s}作为替换的模板</p>
</div>
<dl class="details">
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="TileInfo.html" onclick="getTypeHTML(event)" href="TileInfo.html">TileInfo</a>
</span>
</span>
<h4 class="name" id="tileInfo">
<a class="href-link" href="#tileInfo">#</a>
<span class="code-name">
tileInfo
</span>
</h4>
<div class="description">
<p>瓦片信息,用来构造图层坐标系,如果是自定义坐标系,请自行创建瓦片信息,否则无法创建图层</p>
</div>
<dl class="details">
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="TileSliceType.html" onclick="getTypeHTML(event)" href="global.html#TileSliceType">TileSliceType</a>
</span>
</span>
<h4 class="name" id="tileSliceType">
<a class="href-link" href="#tileSliceType">#</a>
<span class="code-name">
tileSliceType
</span>
</h4>
<div class="description">
<p>瓦片的切片方式。支持TMS和WMTS两种切片方式的瓦片加载,默认为wmts切片方式。关于tms裁图可以参考[https://en.wikipedia.org/wiki/Tile_Map_Service]</p>
</div>
<dl class="details">
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="title">
<a class="href-link" href="#title">#</a>
<span class="code-name">
title
</span>
</h4>
<div class="description">
<p>图层名称</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="title" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#title">Layer#title</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="tokenAttachType">
<a class="href-link" href="#tokenAttachType">#</a>
<span class="code-name">
tokenAttachType
</span>
</h4>
<div class="description">
<p>token附加类型。默认psot请求优先附加到body,get请求优先附加到url末尾</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="tokenAttachType" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#tokenAttachType">Layer#tokenAttachType</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="tokenKey">
<a class="href-link" href="#tokenKey">#</a>
<span class="code-name">
tokenKey
</span>
</h4>
<div class="description">
<p>token名</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="tokenKey" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#tokenKey">Layer#tokenKey</a>
</li></ul></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>token</li>
</ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
String
</span>
</span>
<h4 class="name" id="tokenValue">
<a class="href-link" href="#tokenValue">#</a>
<span class="code-name">
tokenValue
</span>
</h4>
<div class="description">
<p>token值</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a goto="tokenValue" link="Layer.html" onclick="getTypeHTML(event)" href="Layer.html#tokenValue">Layer#tokenValue</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>
<span class="param-type">
<a link="LayerType.html" onclick="getTypeHTML(event)" href="global.html#LayerType">LayerType</a>
</span>
</span>
<h4 class="name" id="type">
<a class="href-link" href="#type">#</a>
<span class="code-name">
type
</span>
</h4>
<div class="description">
<p>图层类型</p>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Layer.html#type">Layer#type</a>
</li></ul></dd>
</dl>
</div>
<div class="member">
<span class="method-parameter is-pulled-right">
<label>类型:</label>