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

2021-03-30 Thread GitBox


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=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:
us...@infra.apache.org



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



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

2021-03-30 Thread GitBox


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
   
   
   
   
   Title
   
   
   
   
   
   
   https://cdn.bootcdn.net/ajax/libs/echarts/4.9.0-rc.1/echarts.min.js";>
   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": [
 10,
 31
   ],
   "parent": {
 "adcode": 31
   }
 },
 "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,

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

2021-03-29 Thread GitBox


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.2 * Math.sin(y * x_pi);
 let theta = Math.atan2(y, x) + 0.03 * 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:
us...@infra.apache.org



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



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

2021-03-29 Thread GitBox


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.2 * Math.sin(y * x_pi);
 let theta = Math.atan2(y, x) + 0.03 * 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:
us...@infra.apache.org



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



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

2021-03-29 Thread GitBox


zhoufanglu commented on issue #14550:
URL: https://github.com/apache/echarts/issues/14550#issuecomment-809869683


   
https://datav.aliyun.com/tools/atlas/#=30.332329214580188=106.72278672066881=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:
us...@infra.apache.org



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