4444/******/ // define getter function for harmony exports
4545/******/ __webpack_require__ . d = function ( exports , name , getter ) {
4646/******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
47- /******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
47+ /******/ Object . defineProperty ( exports , name , {
48+ /******/ configurable : false ,
49+ /******/ enumerable : true ,
50+ /******/ get : getter
51+ /******/ } ) ;
4852/******/ }
4953/******/ } ;
5054/******/
5155/******/ // define __esModule on exports
5256/******/ __webpack_require__ . r = function ( exports ) {
53- /******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
54- /******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
55- /******/ }
5657/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
5758/******/ } ;
5859/******/
59- /******/ // create a fake namespace object
60- /******/ // mode & 1: value is a module id, require it
61- /******/ // mode & 2: merge all properties of value into the ns
62- /******/ // mode & 4: return value when already ns object
63- /******/ // mode & 8|1: behave like require
64- /******/ __webpack_require__ . t = function ( value , mode ) {
65- /******/ if ( mode & 1 ) value = __webpack_require__ ( value ) ;
66- /******/ if ( mode & 8 ) return value ;
67- /******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . __esModule ) return value ;
68- /******/ var ns = Object . create ( null ) ;
69- /******/ __webpack_require__ . r ( ns ) ;
70- /******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
71- /******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) __webpack_require__ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
72- /******/ return ns ;
73- /******/ } ;
74- /******/
7560/******/ // getDefaultExport function for compatibility with non-harmony modules
7661/******/ __webpack_require__ . n = function ( module ) {
7762/******/ var getter = module && module . __esModule ?
@@ -7136,7 +7121,7 @@ var external_function_try_return_mapv_catch_e_return_ = __webpack_require__(0);
71367121 * @extends {mapv.baiduMapLayer }
71377122 * @param {SuperMap.Map } map - 待渲染的地图。
71387123 * @param {SuperMap.Layer.MapVLayer } layer - 待渲染的图层。
7139- * @param {Mapv.DataSet } dataSet - 待渲染的数据集。
7124+ * @param {Mapv.DataSet } dataSet - 待渲染的数据集,数据所属坐标系要求与 map 保持一致 。
71407125 * @param {Object } options - 渲染的参数。
71417126 */
71427127var MapVBaseLayer = external_function_try_return_mapv_catch_e_return_ [ "baiduMapLayer" ] ? external_function_try_return_mapv_catch_e_return_ [ "baiduMapLayer" ] . __proto__ : Function ;
@@ -7154,7 +7139,6 @@ class MapVRenderer_MapVRenderer extends MapVBaseLayer {
71547139 self . init ( options ) ;
71557140 self . argCheck ( options ) ;
71567141 this . canvasLayer = layer ;
7157- self . transferToMercator ( ) ;
71587142 this . clickEvent = this . clickEvent . bind ( this ) ;
71597143 this . mousemoveEvent = this . mousemoveEvent . bind ( this ) ;
71607144 this . bindEvent ( ) ;
@@ -7300,6 +7284,7 @@ class MapVRenderer_MapVRenderer extends MapVBaseLayer {
73007284 /**
73017285 * @function MapvRenderer.prototype.transferToMercator
73027286 * @description 墨卡托坐标为经纬度。
7287+ * @deprecated
73037288 */
73047289 transferToMercator ( ) {
73057290 if ( this . options . coordType && [ "bd09mc" , "coordinates_mercator" ] . indexOf ( this . options . coordType ) > - 1 ) {
@@ -7357,7 +7342,8 @@ class MapVRenderer_MapVRenderer extends MapVBaseLayer {
73577342 var dataGetOptions = {
73587343 fromColumn : 'coordinates' ,
73597344 transferCoordinate : function ( coordinate ) {
7360- var coord = layer . transferToMapLatLng ( { lon : coordinate [ 0 ] , lat : coordinate [ 1 ] } ) ;
7345+ // var coord = layer.transferToMapLatLng({lon: coordinate[0], lat: coordinate[1]});
7346+ var coord = { lon : coordinate [ 0 ] , lat : coordinate [ 1 ] } ;
73617347 var worldPoint = map . getViewPortPxFromLonLat ( coord ) ;
73627348 return [ worldPoint . x , worldPoint . y ] ;
73637349 }
@@ -7678,14 +7664,16 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
76787664 * @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
76797665 * @description 将经纬度转成底图的投影坐标。
76807666 * @param {SuperMap.Lonlat } latLng - 经纬度坐标。
7667+ * @deprecated
76817668 */
76827669 transferToMapLatLng ( latLng ) {
7683- var source = "EPSG:4326" ,
7684- dest = "EPSG:4326" ;
7685- var unit = this . map . getUnits ( ) || "degree" ;
7686- if ( [ "m" , "meter" ] . indexOf ( unit . toLowerCase ( ) ) > - 1 ) {
7687- dest = "EPSG:3857" ;
7670+ const unit = this . map . getUnits ( ) || "degree" ;
7671+ if ( [ "m" , "meter" ] . indexOf ( unit . toLowerCase ( ) ) === - 1 ) {
7672+ return latLng ;
76887673 }
7674+
7675+ let source = "EPSG:4326" ,
7676+ dest = "EPSG:3857" ;
76897677 return new SuperMap_SuperMap . LonLat ( latLng . lon , latLng . lat ) . transform ( source , dest ) ;
76907678 }
76917679
0 commit comments