@@ -7768,35 +7768,37 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
77687768 SuperMap_SuperMap . Util . extend ( this , options ) ;
77697769 }
77707770 //MapV图要求使用canvas绘制,判断是否支持
7771- this . canvas = document . createElement ( " canvas" ) ;
7771+ this . canvas = document . createElement ( ' canvas' ) ;
77727772 if ( ! this . canvas . getContext ) {
77737773 return ;
77747774 }
77757775 this . supported = true ;
77767776 //构建绘图面板
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' ;
77807780 this . div . appendChild ( this . canvas ) ;
7781- var context = this . options && this . options . context || "2d" ;
7781+ var context = ( this . options && this . options . context ) || '2d' ;
77827782 this . canvasContext = this . canvas . getContext ( context ) ;
77837783 var global$2 = typeof window === 'undefined' ? { } : window ;
7784- var devicePixelRatio = this . devicePixelRatio = global$2 . devicePixelRatio ;
7784+ var devicePixelRatio = ( this . devicePixelRatio = global$2 . devicePixelRatio ) ;
77857785 if ( context == '2d' ) {
77867786 this . canvasContext . scale ( devicePixelRatio , devicePixelRatio ) ;
77877787 }
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' " +
77897790 "style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>" ;
77907791
7791- this . CLASS_NAME = " SuperMap.Layer.MapVLayer" ;
7792+ this . CLASS_NAME = ' SuperMap.Layer.MapVLayer' ;
77927793 }
77937794
7794-
77957795 /**
77967796 * @function SuperMap.Layer.MapVLayer.prototype.destroy
77977797 * @override
77987798 */
77997799 destroy ( ) {
7800+ this . renderer . animator && this . renderer . animator . stop ( ) ;
7801+ this . renderer . animator = null ;
78007802 this . dataSet = null ;
78017803 this . options = null ;
78027804 this . renderer = null ;
@@ -7808,7 +7810,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
78087810 super . destroy ( ) ;
78097811 }
78107812
7811-
78127813 /**
78137814 * @function SuperMap.Layer.MapVLayer.prototype.addData
78147815 * @description 追加数据。
@@ -7819,7 +7820,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
78197820 this . renderer && this . renderer . addData ( dataSet , options ) ;
78207821 }
78217822
7822-
78237823 /**
78247824 * @function SuperMap.Layer.MapVLayer.prototype.
78257825 * @description 设置数据。
@@ -7830,7 +7830,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
78307830 this . renderer && this . renderer . setData ( dataSet , options ) ;
78317831 }
78327832
7833-
78347833 /**
78357834 * @function SuperMap.Layer.MapVLayer.prototype.getData
78367835 * @description 获取数据。
@@ -7867,7 +7866,6 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
78677866 this . renderer . clearData ( ) ;
78687867 }
78697868
7870-
78717869 /**
78727870 * @function SuperMap.Layer.MapVLayer.prototype.setMap
78737871 * @description 图层已经添加到 Map 中。
@@ -7899,21 +7897,21 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
78997897 }
79007898 this . zoomChanged = zoomChanged ;
79017899 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' ;
79057903 /*this.canvas.style.left = this.div.style.left;
79067904 this.canvas.style.top = this.div.style.top;*/
79077905 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' ;
79107908 this . canvas . width = parseInt ( size . w ) ;
79117909 this . canvas . height = parseInt ( size . h ) ;
79127910 this . canvas . style . width = this . div . style . width ;
79137911 this . canvas . style . height = this . div . style . height ;
79147912 this . maxWidth = size . w ;
79157913 this . maxHeight = size . h ;
7916- this . div . style . visibility = "" ;
7914+ this . div . style . visibility = '' ;
79177915 if ( ! zoomChanged ) {
79187916 this . renderer && this . renderer . render ( ) ;
79197917 }
@@ -7924,26 +7922,25 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
79247922 }
79257923 }
79267924
7927-
79287925 /**
79297926 * @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
79307927 * @description 将经纬度转成底图的投影坐标。
79317928 * @param {SuperMap.Lonlat } latLng - 经纬度坐标。
79327929 * @deprecated
79337930 */
79347931 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' ;
79407937 }
79417938 return new SuperMap_SuperMap . LonLat ( latLng . lon , latLng . lat ) . transform ( source , dest ) ;
79427939 }
7943-
79447940}
79457941
79467942SuperMap_SuperMap . Layer . MapVLayer = MapVLayer_MapVLayer ;
7943+
79477944// CONCATENATED MODULE: ./src/classic/overlay/mapv/index.js
79487945/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
79497946 * This program are made available under the terms of the Apache License, Version 2.0
0 commit comments