bmap.js 693 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * BMap component extension
  3. */
  4. define(function (require) {
  5. require('echarts').registerCoordinateSystem(
  6. 'bmap', require('./BMapCoordSys')
  7. );
  8. require('./BMapModel');
  9. require('./BMapView');
  10. // Action
  11. require('echarts').registerAction({
  12. type: 'bmapRoam',
  13. event: 'bmapRoam',
  14. update: 'updateLayout'
  15. }, function (payload, ecModel) {
  16. ecModel.eachComponent('bmap', function (bMapModel) {
  17. var bmap = bMapModel.getBMap();
  18. var center = bmap.getCenter();
  19. bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
  20. });
  21. });
  22. return {
  23. version: '1.0.0'
  24. };
  25. });