-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBMapModel.js
More file actions
36 lines (26 loc) · 825 Bytes
/
Copy pathBMapModel.js
File metadata and controls
36 lines (26 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
define(function (require) {
function v2Equal(a, b) {
return a && b && a[0] === b[0] && a[1] === b[1];
}
return require('echarts').extendComponentModel({
type: 'bmap',
getBMap: function () {
// __bmap is injected when creating BMapCoordSys
return this.__bmap;
},
setCenterAndZoom: function (center, zoom) {
this.option.center = center;
this.option.zoom = zoom;
},
centerOrZoomChanged: function (center, zoom) {
var option = this.option;
return !(v2Equal(center, option.center) && zoom === option.zoom);
},
defaultOption: {
center: [104.114129, 37.550339],
zoom: 5,
mapStyle: {},
roam: false
}
});
});