apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.61k stars 19.62k forks source link

请问在使用echarts-for-react时如何引入bmap? #5863

Closed fufjvnvnf closed 7 years ago

fufjvnvnf commented 7 years ago
constructor(props) {
    super(props);

    const longitude = this.props.viewportLongitude;
    const latitude = this.props.viewportLatitude;

    this.option = {
      title: {
        text: 'Demo',
        left: 'center'
      },
      tooltip: {
        trigger: 'item'
      },
      bmap: {
        center: [120.13066322374, 30.240018034923],
        zoom: 5,
        roam: true
      },
      series: [{
        type: 'scatter',
        coordinateSystem: 'bmap',
        data: [ [120, 30, 1] ]
      }]
    };
  }
render() {
    return (
      <ReactEcharts
        option={this.option}
      />
    );
  }

如题 运行代码后仅显示标题demo,并未显示百度地图。

pissang commented 7 years ago

建议去 echarts-for-react 咨询。

百度地图相关的文档在 https://github.com/ecomfe/echarts/tree/master/extension/bmap