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'
40
40
* @param {(number|L.Point) } [options.tileSize=256] - 瓦片大小。
41
41
* @param {(SuperMap.NDVIParameter|SuperMap.HillshadeParameter) } [options.rasterfunction] - 栅格分析参数。
42
42
* @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] - 子域名数组。
43
44
* @fires L.supermap.tiledMapLayer#tilesetsinfoloaded
44
45
* @fires L.supermap.tiledMapLayer#tileversionschanged
45
46
*/
@@ -68,7 +69,8 @@ export var TiledMapLayer = L.TileLayer.extend({
68
69
format : 'png' ,
69
70
//启用托管地址。
70
71
tileProxy :null ,
71
- attribution : Attributions . Common . attribution
72
+ attribution : Attributions . Common . attribution ,
73
+ subdomains : null
72
74
} ,
73
75
74
76
initialize : function ( url , options ) {
@@ -110,6 +112,9 @@ export var TiledMapLayer = L.TileLayer.extend({
110
112
if ( ! this . options . cacheEnabled ) {
111
113
tileUrl += "&_t=" + new Date ( ) . getTime ( ) ;
112
114
}
115
+ if ( this . options . subdomains ) {
116
+ tileUrl = L . Util . template ( tileUrl , { s : this . _getSubdomain ( coords ) } ) ;
117
+ }
113
118
return tileUrl ;
114
119
} ,
115
120
You can’t perform that action at this time.
0 commit comments