@@ -7768,35 +7768,37 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7768
7768
SuperMap_SuperMap . Util . extend ( this , options ) ;
7769
7769
}
7770
7770
//MapV图要求使用canvas绘制,判断是否支持
7771
- this . canvas = document . createElement ( " canvas" ) ;
7771
+ this . canvas = document . createElement ( ' canvas' ) ;
7772
7772
if ( ! this . canvas . getContext ) {
7773
7773
return ;
7774
7774
}
7775
7775
this . supported = true ;
7776
7776
//构建绘图面板
7777
- this . canvas . style . position = " absolute" ;
7778
- this . canvas . style . top = 0 + "px" ;
7779
- this . canvas . style . left = 0 + "px" ;
7777
+ this . canvas . style . position = ' absolute' ;
7778
+ this . canvas . style . top = 0 + 'px' ;
7779
+ this . canvas . style . left = 0 + 'px' ;
7780
7780
this . div . appendChild ( this . canvas ) ;
7781
- var context = this . options && this . options . context || "2d" ;
7781
+ var context = ( this . options && this . options . context ) || '2d' ;
7782
7782
this . canvasContext = this . canvas . getContext ( context ) ;
7783
7783
var global$2 = typeof window === 'undefined' ? { } : window ;
7784
- var devicePixelRatio = this . devicePixelRatio = global$2 . devicePixelRatio ;
7784
+ var devicePixelRatio = ( this . devicePixelRatio = global$2 . devicePixelRatio ) ;
7785
7785
if ( context == '2d' ) {
7786
7786
this . canvasContext . scale ( devicePixelRatio , devicePixelRatio ) ;
7787
7787
}
7788
- this . attribution = "© 2018 百度 <a href='http://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='http://iclient.supermap.io' " +
7788
+ this . attribution =
7789
+ "© 2018 百度 <a href='http://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='http://iclient.supermap.io' " +
7789
7790
"style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>" ;
7790
7791
7791
- this . CLASS_NAME = " SuperMap.Layer.MapVLayer" ;
7792
+ this . CLASS_NAME = ' SuperMap.Layer.MapVLayer' ;
7792
7793
}
7793
7794
7794
-
7795
7795
/**
7796
7796
* @function SuperMap.Layer.MapVLayer.prototype.destroy
7797
7797
* @override
7798
7798
*/
7799
7799
destroy ( ) {
7800
+ this . renderer . animator && this . renderer . animator . stop ( ) ;
7801
+ this . renderer . animator = null ;
7800
7802
this . dataSet = null ;
7801
7803
this . options = null ;
7802
7804
this . renderer = null ;
@@ -7808,7 +7810,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7808
7810
super . destroy ( ) ;
7809
7811
}
7810
7812
7811
-
7812
7813
/**
7813
7814
* @function SuperMap.Layer.MapVLayer.prototype.addData
7814
7815
* @description 追加数据。
@@ -7819,7 +7820,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7819
7820
this . renderer && this . renderer . addData ( dataSet , options ) ;
7820
7821
}
7821
7822
7822
-
7823
7823
/**
7824
7824
* @function SuperMap.Layer.MapVLayer.prototype.
7825
7825
* @description 设置数据。
@@ -7830,7 +7830,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7830
7830
this . renderer && this . renderer . setData ( dataSet , options ) ;
7831
7831
}
7832
7832
7833
-
7834
7833
/**
7835
7834
* @function SuperMap.Layer.MapVLayer.prototype.getData
7836
7835
* @description 获取数据。
@@ -7867,7 +7866,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7867
7866
this . renderer . clearData ( ) ;
7868
7867
}
7869
7868
7870
-
7871
7869
/**
7872
7870
* @function SuperMap.Layer.MapVLayer.prototype.setMap
7873
7871
* @description 图层已经添加到 Map 中。
@@ -7899,21 +7897,21 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7899
7897
}
7900
7898
this . zoomChanged = zoomChanged ;
7901
7899
if ( ! dragging ) {
7902
- this . div . style . visibility = " hidden" ;
7903
- this . div . style . left = - parseInt ( this . map . layerContainerDiv . style . left ) + "px" ;
7904
- this . div . style . top = - parseInt ( this . map . layerContainerDiv . style . top ) + "px" ;
7900
+ this . div . style . visibility = ' hidden' ;
7901
+ this . div . style . left = - parseInt ( this . map . layerContainerDiv . style . left ) + 'px' ;
7902
+ this . div . style . top = - parseInt ( this . map . layerContainerDiv . style . top ) + 'px' ;
7905
7903
/*this.canvas.style.left = this.div.style.left;
7906
7904
this.canvas.style.top = this.div.style.top;*/
7907
7905
var size = this . map . getSize ( ) ;
7908
- this . div . style . width = parseInt ( size . w ) + "px" ;
7909
- this . div . style . height = parseInt ( size . h ) + "px" ;
7906
+ this . div . style . width = parseInt ( size . w ) + 'px' ;
7907
+ this . div . style . height = parseInt ( size . h ) + 'px' ;
7910
7908
this . canvas . width = parseInt ( size . w ) ;
7911
7909
this . canvas . height = parseInt ( size . h ) ;
7912
7910
this . canvas . style . width = this . div . style . width ;
7913
7911
this . canvas . style . height = this . div . style . height ;
7914
7912
this . maxWidth = size . w ;
7915
7913
this . maxHeight = size . h ;
7916
- this . div . style . visibility = "" ;
7914
+ this . div . style . visibility = '' ;
7917
7915
if ( ! zoomChanged ) {
7918
7916
this . renderer && this . renderer . render ( ) ;
7919
7917
}
@@ -7924,26 +7922,25 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
7924
7922
}
7925
7923
}
7926
7924
7927
-
7928
7925
/**
7929
7926
* @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
7930
7927
* @description 将经纬度转成底图的投影坐标。
7931
7928
* @param {SuperMap.Lonlat } latLng - 经纬度坐标。
7932
7929
* @deprecated
7933
7930
*/
7934
7931
transferToMapLatLng ( latLng ) {
7935
- var source = " EPSG:4326" ,
7936
- dest = " EPSG:4326" ;
7937
- var unit = this . map . getUnits ( ) || " degree" ;
7938
- if ( [ "m" , " meter" ] . indexOf ( unit . toLowerCase ( ) ) > - 1 ) {
7939
- dest = " EPSG:3857" ;
7932
+ var source = ' EPSG:4326' ,
7933
+ dest = ' EPSG:4326' ;
7934
+ var unit = this . map . getUnits ( ) || ' degree' ;
7935
+ if ( [ 'm' , ' meter' ] . indexOf ( unit . toLowerCase ( ) ) > - 1 ) {
7936
+ dest = ' EPSG:3857' ;
7940
7937
}
7941
7938
return new SuperMap_SuperMap . LonLat ( latLng . lon , latLng . lat ) . transform ( source , dest ) ;
7942
7939
}
7943
-
7944
7940
}
7945
7941
7946
7942
SuperMap_SuperMap . Layer . MapVLayer = MapVLayer_MapVLayer ;
7943
+
7947
7944
// CONCATENATED MODULE: ./src/classic/overlay/mapv/index.js
7948
7945
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
7949
7946
* This program are made available under the terms of the Apache License, Version 2.0
0 commit comments