1

我已经按照 Windows 10 上的https://github.com/CatalystCode/ibex-dashboard上的说明设置了 IBEX 仪表板。我在timeline.ts 中进行了更改,以获得更多可以正常工作的时间跨度选项。

问题是在构建地图在鼠标悬停后出现以下错误:

react-leaflet-markercluster.min.js:1 Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at isArraysEqual (react-leaflet-markercluster.min.js:1)
at r.value (react-leaflet-markercluster.min.js:1)
at ReactCompositeComponent.js:610
at measureLifeCyclePerf (ReactCompositeComponent.js:75)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:609)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at Object.updateChildren (ReactChildReconciler.js:109)
at ReactDOMComponent._reconcilerUpdateChildren (ReactMultiChild.js:206)
at ReactDOMComponent._updateChildren (ReactMultiChild.js:310)
at ReactDOMComponent.updateChildren (ReactMultiChild.js:297)
at ReactDOMComponent._updateDOMChildren (ReactDOMComponent.js:942)
at ReactDOMComponent.updateComponent (ReactDOMComponent.js:760)
at ReactDOMComponent.receiveComponent (ReactDOMComponent.js:722)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)
at ReactCompositeComponentWrapper.receiveComponent (ReactCompositeComponent.js:546)
at Object.receiveComponent (ReactReconciler.js:124)
at ReactCompositeComponentWrapper._updateRenderedComponent (ReactCompositeComponent.js:753)
at ReactCompositeComponentWrapper._performComponentUpdate (ReactCompositeComponent.js:723)
at ReactCompositeComponentWrapper.updateComponent (ReactCompositeComponent.js:644)

如果我在缩小的 js 文件中进行相同的更改,则地图可以正常工作,但是您可以想象它不会长期工作。

我试图弄清楚我的设置有什么不同,导致我在构建它时发生了重大变化。

4

1 回答 1

1

我认为这可能是由于地图插件引起的: https ://github.com/YUzhva/react-leaflet-markercluster/issues/55

我也遇到了这个问题,但是将代码更改为:

./client/src/components/generic/MapData.tsx:

  promise.then(results => {
    // let markupPopup = (popup && L.popup().setContent(popup)) || null;

    if (results.length) {
      markers.push({ position: [ results[0].y, results[0].x] });
    }
  });
于 2018-01-09T14:56:52.580 回答