You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/03/30 03:03:08 UTC

[GitHub] [echarts] zhoufanglu opened a new issue #14550: 关于effectScatter经纬度不准确的问题

zhoufanglu opened a new issue #14550:
URL: https://github.com/apache/echarts/issues/14550


   ### Version
   4.9.0
   
   ### Steps to reproduce
   我画了个浦东新区的地图,然后我想在上面标记了effectScatter,点,发现经纬度位置与实际的位置不符合
   
   ### What is expected?
   effectScatter经纬度与实际地图符合
   
   ### What is actually happening?
   effectScatter经纬度与实际地图不符合
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809877044


   可以提供个示例代码,方便我们定位问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu closed issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu closed issue #14550:
URL: https://github.com/apache/echarts/issues/14550


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809876681


   > 注意坐标系,阿里云这个应该是高德坐标系,在百度地图上显示需要转换下。
   
   ```js
       //将腾讯/高德地图经纬度转换为百度地图经纬度
       qqMapTransBMap(lng, lat) {
         let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
         let x = lng;
         let y = lat;
         let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
         let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
         let lngs = z * Math.cos(theta) + 0.0065;
         let lats = z * Math.sin(theta) + 0.006;
   
         return {
           lng: lngs,
           lat: lats
         }
       }
   ```
   转换过了 没有效果, 地图的点往上偏移了点


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-810041543


   > 可以提供个示例代码,方便我们定位问题。
   ### 代码如下:
   > 可能数据点比较大,您只要看points就行了,我这个点应该在浦东新区最下面,而他跑到了最上面,与实际偏差太大
   ![image](https://user-images.githubusercontent.com/24451091/112961600-19ce8500-9178-11eb-81c5-c556014b8305.png)
   
   
   ```javascript
   <!DOCTYPE html>
   <html lang="en">
   <head>
       <meta charset="UTF-8">
       <title>Title</title>
   </head>
   <body>
   
   <div style="width: 500px;height: 500px" id="myCharts">
   
   </div>
   <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.9.0-rc.1/echarts.min.js"></script><script>
       console.log(15, echarts)
       //点
       const points = [{
         name: '深水港',
         value: [121.933898,30.867425]
       }]
   
       echarts.registerMap('chinaMap',  {
         "type": "FeatureCollection",
         "features": [
           {
             "type": "Feature",
             "properties": {
               "adcode": 310115,
               "name": "浦东新区",
               "center": [
                 121.567706,
                 31.245944
               ],
               "centroid": [
                 121.742177,
                 31.083823
               ],
               "childrenNum": 0,
               "level": "district",
               "acroutes": [
                 100000,
                 310000
               ],
               "parent": {
                 "adcode": 310000
               }
             },
             "geometry": {
               "type": "MultiPolygon",
               "coordinates": [
                 [
                   [
                     [
                       121.570471,
                       30.998354
                     ],
                     [
                       121.570438,
                       30.999176
                     ],
                     [
                       121.569405,
                       30.999454
                     ],
                     [
                       121.567961,
                       31.000876
                     ],
                     [
                       121.570704,
                       31.002298
                     ],
                     [
                       121.570249,
                       31.004561
                     ],
                     [
                       121.57146,
                       31.005636
                     ],
                     [
                       121.569955,
                       31.008771
                     ],
                     [
                       121.569727,
                       31.010601
                     ],
                     [
                       121.568177,
                       31.010069
                     ],
                     [
                       121.567528,
                       31.01107
                     ],
                     [
                       121.566045,
                       31.011244
                     ],
                     [
                       121.565867,
                       31.011911
                     ],
                     [
                       121.569827,
                       31.012449
                     ],
                     [
                       121.569788,
                       31.013203
                     ],
                     [
                       121.571065,
                       31.014013
                     ],
                     [
                       121.57101,
                       31.016424
                     ],
                     [
                       121.572898,
                       31.017821
                     ],
                     [
                       121.572798,
                       31.01839
                     ],
                     [
                       121.574669,
                       31.018637
                     ],
                     [
                       121.57432,
                       31.020188
                     ],
                     [
                       121.574764,
                       31.020955
                     ],
                     [
                       121.573698,
                       31.023903
                     ],
                     [
                       121.572937,
                       31.025226
                     ],
                     [
                       121.571965,
                       31.025176
                     ],
                     [
                       121.572331,
                       31.026678
                     ],
                     [
                       121.568388,
                       31.025288
                     ],
                     [
                       121.569055,
                       31.024392
                     ],
                     [
                       121.567461,
                       31.023668
                     ],
                     [
                       121.567772,
                       31.023192
                     ],
                     [
                       121.566228,
                       31.022111
                     ],
                     [
                       121.566211,
                       31.021134
                     ],
                     [
                       121.564295,
                       31.021184
                     ],
                     [
                       121.563657,
                       31.023545
                     ],
                     [
                       121.562635,
                       31.022877
                     ],
                     [
                       121.561646,
                       31.023928
                     ],
                     [
                       121.562357,
                       31.024534
                     ],
                     [
                       121.560269,
                       31.024126
                     ],
                     [
                       121.559742,
                       31.022525
                     ],
                     [
                       121.559003,
                       31.022611
                     ],
                     [
                       121.558703,
                       31.020256
                     ],
                     [
                       121.556476,
                       31.020256
                     ],
                     [
                       121.556509,
                       31.018736
                     ],
                     [
                       121.554138,
                       31.018606
                     ],
                     [
                       121.553333,
                       31.020219
                     ],
                     [
                       121.552261,
                       31.020918
                     ],
                     [
                       121.5528,
                       31.023267
                     ],
                     [
                       121.555765,
                       31.022908
                     ],
                     [
                       121.557231,
                       31.023341
                     ],
                     [
                       121.558403,
                       31.024527
                     ],
                     [
                       121.558548,
                       31.026493
                     ],
                     [
                       121.557187,
                       31.026753
                     ],
                     [
                       121.558359,
                       31.027352
                     ],
                     [
                       121.558253,
                       31.029534
                     ],
                     [
                       121.560208,
                       31.029781
                     ],
                     [
                       121.559508,
                       31.030276
                     ],
                     [
                       121.559458,
                       31.041394
                     ],
                     [
                       121.559658,
                       31.042024
                     ],
                     [
                       121.562124,
                       31.043631
                     ],
                     [
                       121.561163,
                       31.04504
                     ],
                     [
                       121.559925,
                       31.043656
                     ],
                     [
                       121.559814,
                       31.044811
                     ],
                     [
                       121.557026,
                       31.047982
                     ],
                     [
                       121.556121,
                       31.047635
                     ],
                     [
                       121.55481,
                       31.049736
                     ],
                     [
                       121.554738,
                       31.050824
                     ],
                     [
                       121.552694,
                       31.049298
                     ],
                     [
                       121.550539,
                       31.049397
                     ],
                     [
                       121.549545,
                       31.047914
                     ],
                     [
                       121.547796,
                       31.04855
                     ],
                     [
                       121.54668,
                       31.048136
                     ],
                     [
                       121.545874,
                       31.047042
                     ],
                     [
                       121.544997,
                       31.047605
                     ],
                     [
                       121.543586,
                       31.047147
                     ],
                     [
                       121.543225,
                       31.045491
                     ],
                     [
                       121.54147,
                       31.046393
                     ],
                     [
                       121.542309,
                       31.049075
                     ],
                     [
                       121.54177,
                       31.050898
                     ],
                     [
                       121.540793,
                       31.05253
                     ],
                     [
                       121.543286,
                       31.054013
                     ],
                     [
                       121.543314,
                       31.055693
                     ],
                     [
                       121.547113,
                       31.05683
                     ],
                     [
                       121.548385,
                       31.056898
                     ],
                     [
                       121.548679,
                       31.057862
                     ],
                     [
                       121.547202,
                       31.06165
                     ],
                     [
                       121.54899,
                       31.062447
                     ],
                     [
                       121.548551,
                       31.063633
                     ],
                     [
                       121.551095,
                       31.0638
                     ],
                     [
                       121.551794,
                       31.065647
                     ],
                     [
                       121.55376,
                       31.065789
                     ],
                     [
                       121.556748,
                       31.067365
                     ],
                     [
                       121.554999,
                       31.068273
                     ],
                     [
                       121.553294,
                       31.066975
                     ],
                     [
                       121.55305,
                       31.067822
                     ],
                     [
                       121.554038,
                       31.068464
                     ],
                     [
                       121.552783,
                       31.069508
                     ],
                     [
                       121.555599,
                       31.071683
                     ],
                     [
                       121.556904,
                       31.072159
                     ],
                     [
                       121.557381,
                       31.071677
                     ],
                     [
                       121.559036,
                       31.072177
                     ],
                     [
                       121.557531,
                       31.073363
                     ],
                     [
                       121.558975,
                       31.073981
                     ],
                     [
                       121.562679,
                       31.074309
                     ],
                     [
                       121.562624,
                       31.075118
                     ],
                     [
                       121.56625,
                       31.075983
                     ],
                     [
                       121.567072,
                       31.076916
                     ],
                     [
                       121.567639,
                       31.076205
                     ],
                     [
                       121.571121,
                       31.077626
                     ],
                     [
                       121.569871,
                       31.07917
                     ],
                     [
                       121.571404,
                       31.079486
                     ],
                     [
                       121.571904,
                       31.078757
                     ],
                     [
                       121.575269,
                       31.08006
                     ],
                     [
                       121.575269,
                       31.081166
                     ],
                     [
                       121.572654,
                       31.081314
                     ],
                     [
                       121.571643,
                       31.080066
                     ],
                     [
                       121.570427,
                       31.080591
                     ],
                     [
                       121.56976,
                       31.081611
                     ],
                     [
                       121.567672,
                       31.082117
                     ],
                     [
                       121.563585,
                       31.082488
                     ],
                     [
                       121.561563,
                       31.083643
                     ],
                     [
                       121.559586,
                       31.083464
                     ],
                     [
                       121.558492,
                       31.082685
                     ],
                     [
                       121.557037,
                       31.082704
                     ],
                     [
                       121.556221,
                       31.08195
                     ],
                     [
                       121.556232,
                       31.080968
                     ],
                     [
                       121.555088,
                       31.081252
                     ],
                     [
                       121.553555,
                       31.080301
                     ],
                     [
                       121.551989,
                       31.081716
                     ],
                     [
                       121.551772,
                       31.082692
                     ],
                     [
                       121.550562,
                       31.082834
                     ],
                     [
                       121.548546,
                       31.086886
                     ],
                     [
                       121.549434,
                       31.087683
                     ],
                     [
                       121.551539,
                       31.088152
                     ],
                     [
                       121.5521,
                       31.088992
                     ],
                     [
                       121.551606,
                       31.090129
                     ],
                     [
                       121.555765,
                       31.09087
                     ],
                     [
                       121.556465,
                       31.091759
                     ],
                     [
                       121.559086,
                       31.091945
                     ],
                     [
                       121.561558,
                       31.093563
                     ],
                     [
                       121.561852,
                       31.091864
                     ],
                     [
                       121.564362,
                       31.091883
                     ],
                     [
                       121.565251,
                       31.092883
                     ],
                     [
                       121.567267,
                       31.093631
                     ],
                     [
                       121.566828,
                       31.096571
                     ],
                     [
                       121.565517,
                       31.096355
                     ],
                     [
                       121.565006,
                       31.098714
                     ],
                     [
                       121.562952,
                       31.09809
                     ],
                     [
                       121.563318,
                       31.098955
                     ],
                     [
                       121.562068,
                       31.101252
                     ],
                     [
                       121.563646,
                       31.101864
                     ],
                     [
                       121.561136,
                       31.105267
                     ],
                     [
                       121.560136,
                       31.105427
                     ],
                     [
                       121.561397,
                       31.106224
                     ],
                     [
                       121.557842,
                       31.109793
                     ],
                     [
                       121.557526,
                       31.110609
                     ],
                     [
                       121.559403,
                       31.110868
                     ],
                     [
                       121.559864,
                       31.111893
                     ],
                     [
                       121.55817,
                       31.113424
                     ],
                     [
                       121.556704,
                       31.113091
                     ],
                     [
                       121.555282,
                       31.114882
                     ],
                     [
                       121.553333,
                       31.112683
                     ],
                     [
                       121.552311,
                       31.1139
                     ],
                     [
                       121.549212,
                       31.113418
                     ],
                     [
                       121.550423,
                       31.111621
                     ],
                     [
                       121.54769,
                       31.109658
                     ],
                     [
                       121.545774,
                       31.10988
                     ],
                     [
                       121.545463,
                       31.111436
                     ],
                     [
                       121.544225,
                       31.111461
                     ],
                     [
                       121.542676,
                       31.114357
                     ],
                     [
                       121.542242,
                       31.11616
                     ],
                     [
                       121.539527,
                       31.115629
                     ],
                     [
                       121.539243,
                       31.11427
                     ],
                     [
                       121.537883,
                       31.11398
                     ],
                     [
                       121.537544,
                       31.115734
                     ],
                     [
                       121.536672,
                       31.116759
                     ],
                     [
                       121.535556,
                       31.116438
                     ],
                     [
                       121.535345,
                       31.117976
                     ],
                     [
                       121.532252,
                       31.117204
                     ],
                     [
                       121.531419,
                       31.11842
                     ],
                     [
                       121.525293,
                       31.116741
                     ],
                     [
                       121.523938,
                       31.116716
                     ],
                     [
                       121.524282,
                       31.115722
                     ],
                     [
                       121.522872,
                       31.11524
                     ],
                     [
                       121.521417,
                       31.116308
                     ],
                     [
                       121.514514,
                       31.115277
                     ],
                     [
                       121.513753,
                       31.118013
                     ],
                     [
                       121.511343,
                       31.121193
                     ],
                     [
                       121.507455,
                       31.12018
                     ],
                     [
                       121.505495,
                       31.120007
                     ],
                     [
                       121.505711,
                       31.119315
                     ],
                     [
                       121.503862,
                       31.118315
                     ],
                     [
                       121.504801,
                       31.11713
                     ],
                     [
                       121.504134,
                       31.116932
                     ],
                     [
                       121.505295,
                       31.115487
                     ],
                     [
                       121.503956,
                       31.114783
                     ],
                     [
                       121.503462,
                       31.115697
                     ],
                     [
                       121.501574,
                       31.11466
                     ],
                     [
                       121.499647,
                       31.120063
                     ],
                     [
                       121.498542,
                       31.121501
                     ],
                     [
                       121.495876,
                       31.119674
                     ],
                     [
                       121.495426,
                       31.120131
                     ],
                     [
                       121.493777,
                       31.119606
                     ],
                     [
                       121.492805,
                       31.118717
                     ],
                     [
                       121.491777,
                       31.121816
                     ],
                     [
                       121.491,
                       31.121779
                     ],
                     [
                       121.490272,
                       31.12428
                     ],
                     [
                       121.488801,
                       31.124848
                     ],
                     [
                       121.487113,
                       31.124274
                     ],
                     [
                       121.485963,
                       31.124521
                     ],
                     [
                       121.485702,
                       31.12194
                     ],
                     [
                       121.484958,
                       31.121285
                     ],
                     [
                       121.484069,
                       31.12168
                     ],
                     [
                       121.483464,
                       31.120075
                     ],
                     [
                       121.481914,
                       31.120087
                     ],
                     [
                       121.48187,
                       31.1185
                     ],
                     [
                       121.479571,
                       31.117204
                     ],
                     [
                       121.478982,
                       31.117803
                     ],
                     [
                       121.477449,
                       31.117333
                     ],
                     [
                       121.47776,
                       31.115116
                     ],
                     [
                       121.478538,
                       31.114882
                     ],
                     [
                       121.481359,
                       31.110701
                     ],
                     [
                       121.479321,
                       31.109985
                     ],
                     [
                       121.478532,
                       31.111331
                     ],
                     [
                       121.477322,
                       31.110856
                     ],
                     [
                       121.478021,
                       31.109478
                     ],
                     [
                       121.477094,
                       31.109367
                     ],
                     [
                       121.477016,
                       31.111282
                     ],
                     [
                       121.475678,
                       31.113313
                     ],
                     [
                       121.474134,
                       31.114357
                     ],
                     [
                       121.474212,
                       31.113239
                     ],
                     [
                       121.471429,
                       31.111961
                     ],
                     [
                       121.472957,
                       31.111103
                     ],
                     [
                       121.471557,
                       31.110195
                     ],
                     [
                       121.470291,
                       31.110936
                     ],
                     [
                       121.465204,
                       31.112097
                     ],
                     [
                       121.467764,
                       31.115796
                     ],
                     [
                       121.469297,
                       31.118729
                     ],
                     [
                       121.469808,
                       31.122502
                     ],
                     [
                       121.46968,
                       31.12486
                     ],
                     [
                       121.46873,
                       31.127867
                     ],
                     [
                       121.462427,
                       31.134461
                     ],
                     [
                       121.458984,
                       31.139357
                     ],
                     [
                       121.457462,
                       31.142234
                     ],
                     [
                       121.457268,
                       31.144345
                     ],
                     [
                       121.457462,
                       31.14645
                     ],
                     [
                       121.458795,
                       31.148555
                     ],
                     [
                       121.460383,
                       31.150277
                     ],
                     [
                       121.465737,
                       31.155123
                     ],
                     [
                       121.468347,
                       31.158086
                     ],
                     [
                       121.469302,
                       31.160252
                     ],
                     [
                       121.469363,
                       31.162301
                     ],
                     [
                       121.468158,
                       31.167097
                     ],
                     [
                       121.465987,
                       31.172336
                     ],
                     [
                       121.46491,
                       31.175404
                     ],
                     [
                       121.46491,
                       31.178026
                     ],
                     [
                       121.466248,
                       31.181087
                     ],
                     [
                       121.46873,
                       31.184117
                     ],
                     [
                       121.471279,
                       31.185839
                     ],
                     [
                       121.475983,
                       31.187887
                     ],
                     [
                       121.49075,
                       31.191466
                     ],
                     [
                       121.494638,
                       31.19286
                     ],
                     [
                       121.49807,
                       31.1956
                     ],
                     [
                       121.501313,
                       31.19974
                     ],
                     [
                       121.508377,
                       31.21016
                     ],
                     [
                       121.509249,
                       31.212109
                     ],
                     [
                       121.509904,
                       31.214502
                     ],
                     [
                       121.509843,
                       31.216742
                     ],
                     [
                       121.509393,
                       31.218463
                     ],
                     [
                       121.506733,
                       31.223113
                     ],
                     [
                       121.502018,
                       31.228023
                     ],
                     [
                       121.495748,
                       31.232976
                     ],
                     [
                       121.494349,
                       31.234542
                     ],
                     [
                       121.493488,
                       31.236146
                     ],
                     [
                       121.493494,
                       31.240167
                     ],
                     [
                       121.494832,
                       31.242208
                     ],
                     [
                       121.500013,
                       31.244989
                     ],
                     [
                       121.502873,
                       31.245809
                     ],
                     [
                       121.506878,
                       31.246469
                     ],
                     [
                       121.516491,
                       31.24695
                     ],
                     [
                       121.52426,
                       31.247006
                     ],
                     [
                       121.527564,
                       31.247252
                     ],
                     [
                       121.536378,
                       31.249626
                     ],
                     [
                       121.540004,
                       31.25102
                     ],
                     [
                       121.541537,
                       31.251834
                     ],
                     [
                       121.547552,
                       31.25594
                     ],
                     [
                       121.555165,
                       31.261483
                     ],
                     [
                       121.559075,
                       31.264221
                     ],
                     [
                       121.56354,
                       31.268808
                     ],
                     [
                       121.565967,
                       31.27181
                     ],
                     [
                       121.568511,
                       31.2757
                     ],
                     [
                       121.569527,
                       31.279565
                     ],
                     [
                       121.569144,
                       31.285249
                     ],
                     [
                       121.565456,
                       31.294131
                     ],
                     [
                       121.562518,
                       31.299758
                     ],
                     [
                       121.561758,
                       31.303338
                     ],
                     [
                       121.561885,
                       31.32116
                     ],
                     [
                       121.560486,
                       31.327808
                     ],
                     [
                       121.55857,
                       31.331258
                     ],
                     [
                       121.555776,
                       31.333944
                     ],
                     [
                       121.549401,
                       31.337789
                     ],
                     [
                       121.545586,
                       31.339335
                     ],
                     [
                       121.525487,
                       31.346801
                     ],
                     [
                       121.514908,
                       31.352
                     ],
                     [
                       121.508421,
                       31.357254
                     ],
                     [
                       121.505367,
                       31.361861
                     ],
                     [
                       121.503834,
                       31.364934
                     ],
                     [
                       121.503457,
                       31.369406
                     ],
                     [
                       121.50384,
                       31.373747
                     ],
                     [
                       121.507283,
                       31.379105
                     ],
                     [
                       121.512364,
                       31.38586
                     ],
                     [
                       121.521233,
                       31.394788
                     ],
                     [
                       121.538016,
                       31.388495
                     ],
                     [
                       121.559814,
                       31.383606
                     ],
                     [
                       121.593713,
                       31.37642
                     ],
                     [
                       121.598944,
                       31.374603
                     ],
                     [
                       121.603042,
                       31.372657
                     ],
                     [
                       121.606597,
                       31.37044
                     ],
                     [
                       121.610556,
                       31.368199
                     ],
                     [
                       121.689455,
                       31.322466
                     ],
                     [
                       121.698863,
                       31.317173
                     ],
                     [
                       121.71243,
                       31.309409
                     ],
                     [
                       121.722516,
                       31.303511
                     ],
                     [
                       121.729096,
                       31.298285
                     ],
                     [
                       121.743747,
                       31.283202
                     ],
                     [
                       121.809811,
                       31.196908
                     ],
                     [
                       121.853362,
                       31.155345
                     ],
                     [
                       121.863159,
                       31.147401
                     ],
                     [
                       121.884034,
                       31.130639
                     ],
                     [
                       121.88946,
                       31.121705
                     ],
                     [
                       121.946795,
                       31.065888
                     ],
                     [
                       121.962678,
                       31.047289
                     ],
                     [
                       121.977556,
                       31.016102
                     ],
                     [
                       121.990934,
                       30.968425
                     ],
                     [
                       121.996232,
                       30.935455
                     ],
                     [
                       121.998493,
                       30.899961
                     ],
                     [
                       121.996982,
                       30.874904
                     ],
                     [
                       121.993955,
                       30.863061
                     ],
                     [
                       121.98537,
                       30.850695
                     ],
                     [
                       121.970736,
                       30.839072
                     ],
                     [
                       121.954714,
                       30.825818
                     ],
                     [
                       121.954331,
                       30.821408
                     ],
                     [
                       121.955469,
                       30.817134
                     ],
                     [
                       121.969709,
                       30.789199
                     ],
                     [
                       121.943685,
                       30.777097
                     ],
                     [
                       121.924603,
                       30.806603
                     ],
                     [
                       121.91529,
                       30.812897
                     ],
                     [
                       121.904466,
                       30.814154
                     ],
                     [
                       121.793767,
                       30.816861
                     ],
                     [
                       121.769343,
                       30.850423
                     ],
                     [
                       121.768138,
                       30.863265
                     ],
                     [
                       121.771598,
                       30.875424
                     ],
                     [
                       121.772475,
                       30.875703
                     ],
                     [
                       121.773125,
                       30.880599
                     ],
                     [
                       121.776679,
                       30.881002
                     ],
                     [
                       121.776013,
                       30.886418
                     ],
                     [
                       121.777929,
                       30.891023
                     ],
                     [
                       121.778806,
                       30.894582
                     ],
                     [
                       121.77774,
                       30.894879
                     ],
                     [
                       121.778695,
                       30.895542
                     ],
                     [
                       121.778989,
                       30.899472
                     ],
                     [
                       121.778217,
                       30.900759
                     ],
                     [
                       121.778884,
                       30.900939
                     ],
                     [
                       121.778328,
                       30.903804
                     ],
                     [
                       121.778839,
                       30.906484
                     ],
                     [
                       121.778956,
                       30.910123
                     ],
                     [
                       121.780239,
                       30.911812
                     ],
                     [
                       121.781116,
                       30.917567
                     ],
                     [
                       121.779522,
                       30.922486
                     ],
                     [
                       121.777734,
                       30.922598
                     ],
                     [
                       121.777784,
                       30.923353
                     ],
                     [
                       121.779406,
                       30.922895
                     ],
                     [
                       121.777656,
                       30.926719
                     ],
                     [
                       121.777573,
                       30.929101
                     ],
                     [
                       121.778878,
                       30.929398
                     ],
                     [
                       121.778734,
                       30.93019
                     ],
                     [
                       121.77749,
                       30.929775
                     ],
                     [
                       121.777806,
                       30.931031
                     ],
                     [
                       121.776679,
                       30.931532
                     ],
                     [
                       121.773375,
                       30.931551
                     ],
                     [
                       121.773025,
                       30.933927
                     ],
                     [
                       121.771864,
                       30.933574
                     ],
                     [
                       121.769765,
                       30.935275
                     ],
                     [
                       121.769682,
                       30.93655
                     ],
                     [
                       121.768632,
                       30.936574
                     ],
                     [
                       121.768854,
                       30.937397
                     ],
                     [
                       121.767988,
                       30.938331
                     ],
                     [
                       121.766672,
                       30.937484
                     ],
                     [
                       121.766427,
                       30.936537
                     ],
                     [
                       121.763845,
                       30.936847
                     ],
                     [
                       121.764278,
                       30.938517
                     ],
                     [
                       121.762523,
                       30.938913
                     ],
                     [
                       121.761474,
                       30.938418
                     ],
                     [
                       121.761685,
                       30.940132
                     ],
                     [
                       121.762734,
                       30.94015
                     ],
                     [
                       121.763434,
                       30.94135
                     ],
                     [
                       121.764545,
                       30.941765
                     ],
                     [
                       121.763395,
                       30.943145
                     ],
                     [
                       121.761884,
                       30.943516
                     ],
                     [
                       121.760918,
                       30.944617
                     ],
                     [
                       121.760668,
                       30.946535
                     ],
                     [
                       121.761024,
                       30.947605
                     ],
                     [
                       121.759596,
                       30.948347
                     ],
                     [
                       121.759291,
                       30.949145
                     ],
                     [
                       121.756164,
                       30.95037
                     ],
                     [
                       121.751983,
                       30.952727
                     ],
                     [
                       121.749234,
                       30.953054
                     ],
                     [
                       121.747862,
                       30.951885
                     ],
                     [
                       121.743741,
                       30.956586
                     ],
                     [
                       121.742941,
                       30.956364
                     ],
                     [
                       121.741509,
                       30.95752
                     ],
                     [
                       121.739987,
                       30.956722
                     ],
                     [
                       121.73686,
                       30.958702
                     ],
                     [
                       121.737921,
                       30.960638
                     ],
                     [
                       121.735722,
                       30.9624
                     ],
                     [
                       121.733961,
                       30.964466
                     ],
                     [
                       121.733389,
                       30.966241
                     ],
                     [
                       121.731901,
                       30.967787
                     ],
                     [
                       121.727081,
                       30.970979
                     ],
                     [
                       121.721305,
                       30.975141
                     ],
                     [
                       121.718045,
                       30.977194
                     ],
                     [
                       121.712786,
                       30.980935
                     ],
                     [
                       121.707788,
                       30.983823
                     ],
                     [
                       121.705505,
                       30.984979
                     ],
                     [
                       121.702284,
                       30.986043
                     ],
                     [
                       121.699452,
                       30.987416
                     ],
                     [
                       121.697364,
                       30.987712
                     ],
                     [
                       121.692982,
                       30.989339
                     ],
                     [
                       121.688084,
                       30.990143
                     ],
                     [
                       121.683602,
                       30.989802
                     ],
                     [
                       121.681592,
                       30.990155
                     ],
                     [
                       121.680131,
                       30.990816
                     ],
                     [
                       121.674555,
                       30.9918
                     ],
                     [
                       121.6745,
                       30.990934
                     ],
                     [
                       121.673172,
                       30.990928
                     ],
                     [
                       121.673356,
                       30.989833
                     ],
                     [
                       121.672484,
                       30.989883
                     ],
                     [
                       121.669735,
                       30.990971
                     ],
                     [
                       121.669524,
                       30.991608
                     ],
                     [
                       121.663804,
                       30.992387
                     ],
                     [
                       121.663087,
                       30.991509
                     ],
                     [
                       121.663109,
                       30.992715
                     ],
                     [
                       121.654535,
                       30.993259
                     ],
                     [
                       121.646699,
                       30.993345
                     ],
                     [
                       121.641734,
                       30.99316
                     ],
                     [
                       121.63216,
                       30.99303
                     ],
                     [
                       121.63166,
                       30.992393
                     ],
                     [
                       121.629538,
                       30.993271
                     ],
                     [
                       121.628905,
                       30.992752
                     ],
                     [
                       121.621158,
                       30.992579
                     ],
                     [
                       121.620575,
                       30.992678
                     ],
                     [
                       121.617715,
                       30.995689
                     ],
                     [
                       121.616043,
                       30.998224
                     ],
                     [
                       121.614716,
                       31.001247
                     ],
                     [
                       121.612489,
                       31.001445
                     ],
                     [
                       121.611345,
                       31.00095
                     ],
                     [
                       121.604059,
                       31.001136
                     ],
                     [
                       121.602715,
                       31.001414
                     ],
                     [
                       121.595584,
                       31.002045
                     ],
                     [
                       121.594679,
                       31.000697
                     ],
                     [
                       121.584305,
                       31.00082
                     ],
                     [
                       121.582989,
                       31.000647
                     ],
                     [
                       121.582939,
                       30.999491
                     ],
                     [
                       121.578152,
                       30.999361
                     ],
                     [
                       121.577491,
                       30.998811
                     ],
                     [
                       121.576746,
                       30.999473
                     ],
                     [
                       121.570471,
                       30.998354
                     ]
                   ]
                 ],
                 [
                   [
                     [
                       121.943252,
                       31.215465
                     ],
                     [
                       121.946589,
                       31.224366
                     ],
                     [
                       121.951043,
                       31.228819
                     ],
                     [
                       121.957252,
                       31.230416
                     ],
                     [
                       121.969181,
                       31.230287
                     ],
                     [
                       121.98066,
                       31.228091
                     ],
                     [
                       121.989662,
                       31.224526
                     ],
                     [
                       122.008567,
                       31.220992
                     ],
                     [
                       122.011038,
                       31.217408
                     ],
                     [
                       122.012615,
                       31.210005
                     ],
                     [
                       122.012015,
                       31.192046
                     ],
                     [
                       122.010588,
                       31.188004
                     ],
                     [
                       122.005407,
                       31.17699
                     ],
                     [
                       121.999559,
                       31.165072
                     ],
                     [
                       121.995732,
                       31.160795
                     ],
                     [
                       121.975862,
                       31.158839
                     ],
                     [
                       121.970769,
                       31.157555
                     ],
                     [
                       121.965677,
                       31.157542
                     ],
                     [
                       121.959629,
                       31.159277
                     ],
                     [
                       121.952632,
                       31.167202
                     ],
                     [
                       121.948022,
                       31.176403
                     ],
                     [
                       121.94484,
                       31.186881
                     ],
                     [
                       121.942613,
                       31.198469
                     ],
                     [
                       121.941824,
                       31.20768
                     ],
                     [
                       121.943252,
                       31.215465
                     ]
                   ]
                 ],
                 [
                   [
                     [
                       121.882618,
                       31.240851
                     ],
                     [
                       121.88991,
                       31.242596
                     ],
                     [
                       121.897368,
                       31.242115
                     ],
                     [
                       121.905932,
                       31.239414
                     ],
                     [
                       121.915451,
                       31.236553
                     ],
                     [
                       121.923553,
                       31.233864
                     ],
                     [
                       121.92673,
                       31.229738
                     ],
                     [
                       121.927524,
                       31.22402
                     ],
                     [
                       121.925453,
                       31.205434
                     ],
                     [
                       121.922437,
                       31.196858
                     ],
                     [
                       121.918783,
                       31.194316
                     ],
                     [
                       121.913857,
                       31.193835
                     ],
                     [
                       121.908781,
                       31.195267
                     ],
                     [
                       121.901639,
                       31.201455
                     ],
                     [
                       121.889277,
                       31.215002
                     ],
                     [
                       121.885156,
                       31.220523
                     ],
                     [
                       121.88254,
                       31.225605
                     ],
                     [
                       121.88143,
                       31.231169
                     ],
                     [
                       121.88088,
                       31.236325
                     ],
                     [
                       121.88183,
                       31.239581
                     ],
                     [
                       121.882618,
                       31.240851
                     ]
                   ]
                 ]
               ]
             }
           }
         ]
       })
   
       let myCharts = echarts.init(document.querySelector('#myCharts'))
       console.log(2119, myCharts)
   
       const levelColorMap = ['rgba(241, 109, 115, .8)',
         'rgb(255,235,59)',
         'rgba(147, 235, 248)'
       ]
   
       const option = {
         backgroundColor: '',
         tooltip: {
           trigger: 'item'
         },
         geo: { //地图相关行为
           //silent: true,
           map: 'chinaMap',
           show: false,
           zoom: 0.8,
           top: '0%',
           label: {
             normal: {
               show: true,
               textStyle: {
                 color: '#fff'
               }
             },
             emphasis: {
               show: false,
               textStyle: {
                 color: '#fff'
               }
             }
           },
   
           roam: false,
         },
         series: [
           {
             map: 'chinaMap',
             type: 'map',
             zoom: 1.14,
             label: {
               normal: {
                 show: true,
                 textStyle: {
                   color: '#fff'
                 }
               },
               emphasis: {
                 textStyle: {
                   color: '#fff'
                 }
               }
             },
             top: '14%',
             tooltip: {
               show: false
             },
             roam: false,
             itemStyle: {
               normal: {
                 areaColor: 'transparent',
                 borderColor: '#01f3f6',
                 borderWidth: 1,
               },
               emphasis: {
                 areaColor: `rgba(1, 243, 246, .4)`,
                 textStyle: {
                   color: 'white'
                 }
               }
             }
           },
           {
             type: 'effectScatter',   //  指明图表类型:带涟漪效果的散点图
             coordinateSystem: 'geo', //  指明绘制在geo坐标系上
             showEffectOn: 'render',
             legendHoverLink:true,       //是否启用图例 hover 时的联动高亮
             hoverAnimation:true,        //是否开启鼠标 hover 的提示动画效果
             rippleEffect: {
               period: 2, //速度
               scale: 6, //缩放
               brushType: 'stroke' //stroke fill
             },
             data: points,
             itemStyle: {
               normal: {
                 color: params => {
                   return levelColorMap[Math.floor(Math.random() * 3)]
                 },
                 shadowBlur: 10,
                 shadowColor: '#333'
               }
             },
             tooltip: {
               show: true,
               trigger: 'item',
               formatter(val) {
                 //console.log(val.data.name)
                 return val.data.name
               }
             },
           },
         ]
       }
   
   
       //myCharts = this.$echarts.init(this.$refs.companyMap)
   
       myCharts.setOption(option)
   
   
   </script>
   </body>
   </html>
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-810694571


   > 应该是因为 geo 和 map 设定了 top 以及 zoom 的原因,当前的配置项 effectScatter 无法跟随地图同时缩放。
   > 在当前的例子基础上稍微改了下,可作为参考。https://www.makeapie.com/editor.html?c=xmveYphRJD&v=2
   
   大佬确实强,非常感谢回答我的问题,有空帮我看另外一个问题吗?问题在这里 [issues](https://github.com/apache/echarts/issues/14493)
   >还是这个demo,我启动了个定时器,切换了地图数据,从中国-上海-浦东新区,来回切换,我想切换的时候加上切换动画,请问有什么方法可以加吗?
   ```javascript
   setTimeout(_=>{
     this.$echarts.registerMap('chinaMap',  data)//类似这样切换了数据源
   }, 1000) 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809869133






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809876014


   注意坐标系,阿里云这个应该是高德坐标系,在百度地图上显示需要转换下。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu removed a comment on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu removed a comment on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809876437


   > 注意坐标系,阿里云这个应该是高德坐标系,在百度地图上显示需要转换下。
   
   转换过了 没有效果
   ```
       //将腾讯/高德地图经纬度转换为百度地图经纬度
       qqMapTransBMap(lng, lat) {
         let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
         let x = lng;
         let y = lat;
         let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
         let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
         let lngs = z * Math.cos(theta) + 0.0065;
         let lats = z * Math.sin(theta) + 0.006;
   
         return {
           lng: lngs,
           lat: lats
         }
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809876437


   > 注意坐标系,阿里云这个应该是高德坐标系,在百度地图上显示需要转换下。
   
   转换过了 没有效果
   ```
       //将腾讯/高德地图经纬度转换为百度地图经纬度
       qqMapTransBMap(lng, lat) {
         let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
         let x = lng;
         let y = lat;
         let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
         let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
         let lngs = z * Math.cos(theta) + 0.0065;
         let lats = z * Math.sin(theta) + 0.006;
   
         return {
           lng: lngs,
           lat: lats
         }
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart edited a comment on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-810395555


   应该是因为 geo 和 map 设定了 top 以及 zoom 的原因,当前的配置项 effectScatter 无法跟随地图同时缩放。
   在当前的例子基础上稍微改了下,可作为参考。https://www.makeapie.com/editor.html?c=xmveYphRJD&v=2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] zhoufanglu commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809869683


   https://datav.aliyun.com/tools/atlas/#&lat=30.332329214580188&lng=106.72278672066881&zoom=3.5 地图是用这个生成的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #14550: 关于effectScatter经纬度不准确的问题

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-810395555


   应该是因为 geo 和 map 设定了 top 以及 zoom 的原因,当前的配置项 effectScatter 无法跟随地图同时缩放。
   在当前的例子基础上稍微改了下,可作为参考。https://www.makeapie.com/editor.html?c=xmveYphRJD&v=1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org