File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import Attributions from '../core/Attributions'
4040 * @param {(number|L.Point) } [options.tileSize=256] - 瓦片大小。
4141 * @param {(SuperMap.NDVIParameter|SuperMap.HillshadeParameter) } [options.rasterfunction] - 栅格分析参数。
4242 * @param {string } [options.attribution='Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' title='SuperMap iServer' target='_blank'>SuperMap iServer</a></span>'] - 版权信息。
43+ * @param {Array.<number> } [options.subdomains] - 子域名数组。
4344 * @fires L.supermap.tiledMapLayer#tilesetsinfoloaded
4445 * @fires L.supermap.tiledMapLayer#tileversionschanged
4546 */
@@ -68,7 +69,8 @@ export var TiledMapLayer = L.TileLayer.extend({
6869 format : 'png' ,
6970 //启用托管地址。
7071 tileProxy :null ,
71- attribution : Attributions . Common . attribution
72+ attribution : Attributions . Common . attribution ,
73+ subdomains : null
7274 } ,
7375
7476 initialize : function ( url , options ) {
@@ -110,6 +112,9 @@ export var TiledMapLayer = L.TileLayer.extend({
110112 if ( ! this . options . cacheEnabled ) {
111113 tileUrl += "&_t=" + new Date ( ) . getTime ( ) ;
112114 }
115+ if ( this . options . subdomains ) {
116+ tileUrl = L . Util . template ( tileUrl , { s : this . _getSubdomain ( coords ) } ) ;
117+ }
113118 return tileUrl ;
114119 } ,
115120
You can’t perform that action at this time.
0 commit comments