You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2019/07/24 02:25:48 UTC
[incubator-echarts] branch master updated: Feature - support
version 3.0 (bmap)
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/master by this push:
new c10773f Feature - support version 3.0 (bmap)
new b65dfb8 Merge pull request #10845 from JessciaVip/master
c10773f is described below
commit c10773fa0eccb5c11c57bd7d7f813d83c2d55cb6
Author: chengjie <v_...@baidu.com>
AuthorDate: Thu Jul 11 18:21:19 2019 +0800
Feature - support version 3.0 (bmap)
Expanding echart to support version 3.0 (bmap) of Baidu Map API.
---
extension-src/bmap/BMapModel.js | 2 ++
extension-src/bmap/BMapView.js | 15 +++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/extension-src/bmap/BMapModel.js b/extension-src/bmap/BMapModel.js
index 8fb263d..ca5cb65 100644
--- a/extension-src/bmap/BMapModel.js
+++ b/extension-src/bmap/BMapModel.js
@@ -49,6 +49,8 @@ export default echarts.extendComponentModel({
mapStyle: {},
+ mapStyleV2: {},
+
roam: false
}
});
\ No newline at end of file
diff --git a/extension-src/bmap/BMapView.js b/extension-src/bmap/BMapView.js
index dfd6e72..b6ee812 100644
--- a/extension-src/bmap/BMapView.js
+++ b/extension-src/bmap/BMapView.js
@@ -87,6 +87,7 @@ export default echarts.extendComponentView({
bmap.disablePinchToZoom();
}
+ /* map 2.0 */
var originalStyle = bMapModel.__mapStyle;
var newMapStyle = bMapModel.get('mapStyle') || {};
@@ -100,6 +101,20 @@ export default echarts.extendComponentView({
bMapModel.__mapStyle = JSON.parse(mapStyleStr);
}
+ /* map 3.0 */
+ var originalStyle2 = bMapModel.__mapStyle2;
+
+ var newMapStyle2 = bMapModel.get('mapStyleV2') || {};
+ // FIXME, Not use JSON methods
+ var mapStyleStr2 = JSON.stringify(newMapStyle2);
+ if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
+ // FIXME May have blank tile when dragging if setMapStyle
+ if (Object.keys(newMapStyle2).length) {
+ bmap.setMapStyleV2(newMapStyle2);
+ }
+ bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
+ }
+
rendering = false;
}
});
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org