-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbmap.js
More file actions
28 lines (25 loc) · 695 Bytes
/
Copy pathbmap.js
File metadata and controls
28 lines (25 loc) · 695 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
/**
* BMap component extension
*/
define(function (require) {
require('echarts').registerCoordinateSystem(
'bmap', require('./BMapCoordSys')
);
require('./BMapModel');
require('./BMapView');
// Action
require('echarts').registerAction({
type: 'bmapRoam',
event: 'bmapRoam',
update: 'updateLayout'
}, function (payload, ecModel) {
ecModel.eachComponent('bmap', function (bMapModel) {
var bmap = bMapModel.getBMap();
var center = bmap.getView().getCenter();
bMapModel.setCenterAndZoom(center, bmap.getView().getZoom());
});
});
return {
version: '1.0.0'
};
});