我尝试从 https://github.com/PaulLeCam/react-leaflet/blob/master/docs/Getting%20started.md运行反应代码示例,但出现“_leaflet2.default.map 不是函数”错误从 react-leaflet.js 中的下一个代码:
Map.prototype.componentDidMount = function componentDidMount() {
var props = (0, _omit3.default)(this.props, ['children', 'className', 'id', 'style']);
this.leafletElement = _leaflet2.default.map(this.container, props); //line with error
...
}
链接到我的源代码:https ://github.com/sergeysibara/react-leaflet-test