You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/09/25 13:18:22 UTC

[echarts] branch docs/extension-bmap created (now 0d58d5a82)

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a change to branch docs/extension-bmap
in repository https://gitbox.apache.org/repos/asf/echarts.git


      at 0d58d5a82 docs(extension/bmap): improve documentation of bmap extension.

This branch includes the following new commits:

     new 0d58d5a82 docs(extension/bmap): improve documentation of bmap extension.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[echarts] 01/01: docs(extension/bmap): improve documentation of bmap extension.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch docs/extension-bmap
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 0d58d5a82ac10f35a0763f5eeda72dc237d5155e
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Sep 25 21:13:53 2022 +0800

    docs(extension/bmap): improve documentation of bmap extension.
---
 extension-src/bmap/BMapModel.ts |  4 ++--
 extension-src/bmap/README.md    | 34 +++++++++++++++++++++++-----------
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/extension-src/bmap/BMapModel.ts b/extension-src/bmap/BMapModel.ts
index 6e0f3e6be..f84c127c8 100644
--- a/extension-src/bmap/BMapModel.ts
+++ b/extension-src/bmap/BMapModel.ts
@@ -48,10 +48,10 @@ export default echarts.extendComponentModel({
 
         zoom: 5,
 
-        // 2.0 http://lbsyun.baidu.com/custom/index.htm
+        // 2.0 https://lbsyun.baidu.com/custom/index.htm
         mapStyle: {},
 
-        // 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
+        // 3.0 https://lbsyun.baidu.com/index.php?title=open/custom
         mapStyleV2: {},
 
         // See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
diff --git a/extension-src/bmap/README.md b/extension-src/bmap/README.md
index 61b9a86ac..f651075a1 100644
--- a/extension-src/bmap/README.md
+++ b/extension-src/bmap/README.md
@@ -1,6 +1,6 @@
 ## 百度地图扩展
 
-ECharts 百度地图扩展,可以在百度地图上展现 [点图](https://echarts.apache.org/zh/option.html#series-scatter),[线图](https://echarts.apache.org/zh/option.html#series-line),[热力图](https://echarts.apache.org/zh/option.html#series-heatmap) 等可视化。
+ECharts 百度地图扩展,可以在百度地图上展现 [点图](https://echarts.apache.org/zh/option.html#series-scatter),[线图](https://echarts.apache.org/zh/option.html#series-lines),[热力图](https://echarts.apache.org/zh/option.html#series-heatmap) 等可视化。
 
 
 ### 示例
@@ -11,18 +11,19 @@ ECharts 百度地图扩展,可以在百度地图上展现 [点图](https://ech
 
 [北京公交路线特效](https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect)
 
-[北京公交路线特效](https://echarts.apache.org/examples/zh/editor.html?c=lines-bmap-effect)
-
 [杭州热门步行路线](https://echarts.apache.org/examples/zh/editor.html?c=heatmap-bmap)
 
+[在地图上显示分箱图](https://echarts.apache.org/examples/zh/editor.html?c=map-bin)
+
 
 ### 引入
 
 可以直接引入打包好的扩展文件和百度地图的 jssdk
 
 ```html
-<!--引入百度地图的jssdk,这里需要使用你在百度地图开发者平台申请的 ak-->
-<script src="http://api.map.baidu.com/api?v=2.0&ak="></script>
+<!-- 引入百度地图的 JS SDK,这里需要使用你在百度地图开发者平台申请的 ak -->
+<!-- 如需使用百度地图 2.0 版本,请将 `v=3.0` 改为 `v=2.0` -->
+<script src="https://api.map.baidu.com/api?v=3.0&ak="></script>
 <!-- 引入 ECharts -->
 <script src="dist/echarts.min.js"></script>
 <!-- 引入百度地图扩展 -->
@@ -46,21 +47,32 @@ require('echarts/extension/bmap/bmap');
 option = {
     // 加载 bmap 组件
     bmap: {
-        // 百度地图中心经纬度
+        // 百度地图中心经纬度。默认为 [104.114129, 37.550339]。
         center: [120.13066322374, 30.240018034923],
-        // 百度地图缩放
+        // 百度地图缩放级别。默认为 5。
         zoom: 14,
-        // 是否开启拖拽缩放,可以只设置 'scale' 或者 'move'
+        // 是否开启拖拽缩放,可以只设置 'scale' 或者 'move'。默认关闭。
         roam: true,
-        // 百度地图的自定义样式,见 http://developer.baidu.com/map/jsdevelop-11.htm
-        mapStyle: {}
+        // 百度地图的旧版自定义样式,见 https://lbsyun.baidu.com/custom/index.htm
+        mapStyle: {},
+        // 百度地图 3.0 之后的新版自定义样式,见 https://lbsyun.baidu.com/index.php?title=open/custom
+        mapStyleV2: {},
+        // 百度地图的初始化配置,见 https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
+        mapOptions: {
+            // 禁用百度地图自带的底图可点功能
+            enableMapClick: false
+        }
     },
     series: [{
         type: 'scatter',
         // 使用百度地图坐标系
         coordinateSystem: 'bmap',
         // 数据格式跟在 geo 坐标系上一样,每一项都是 [经度,纬度,数值大小,其它维度...]
-        data: [ [120, 30, 1] ]
+        data: [ [120, 30, 1] ],
+        // 编码数据项中第三个元素作为 value 维度
+        encode: {
+            value: 2
+        }
     }]
 }
 


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