将 Mapbox 放入 React-Starter-Kit
Putting Mapbox in React-Starter-Kit
将 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,
};
}
这可能吗?
免责声明:其实我是第一次,所以请多多包涵。
有几个 React 组件包装了 mapbox.js 和 mapboxgl-js:
这里有一篇关于github的相关讨论:https://github.com/mapbox/mapbox.js/issues/951
将 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,
};
}
这可能吗?
免责声明:其实我是第一次,所以请多多包涵。
有几个 React 组件包装了 mapbox.js 和 mapboxgl-js:
这里有一篇关于github的相关讨论:https://github.com/mapbox/mapbox.js/issues/951