【问题标题】:Putting Mapbox in React-Starter-Kit将 Mapbox 放入 React-Starter-Kit
【发布时间】:2016-04-05 09:53:37
【问题描述】:

将 Mapbox 放入 React-Starter-Kit 中,我无法在 react-starter-kit 中实现 MapBox。我不知道如何从客户端制作组件。

Im using this for npm package of mapbox

我希望我能做到

 MapBoxComponent extends Component{


static propTypes = {
    path: PropTypes.string.isRequired,
    content: PropTypes.string.isRequired,
    title: PropTypes.string,
  };

  static contextTypes = {
    onSetTitle: PropTypes.func.isRequired,
  };
 }

这可能吗?

免责声明:这是我的第一次,所以请多多包涵。

【问题讨论】:

    标签: mapbox react-starter-kit


    【解决方案1】:

    有几个 React 组件包装了 mapbox.js 和 mapboxgl-js

    这里是github上的相关讨论:https://github.com/mapbox/mapbox.js/issues/951

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-08
      • 2018-05-12
      • 2016-12-27
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 2017-03-05
      • 2015-12-02
      相关资源
      最近更新 更多