成功构建后,IBEX仪表板地图中断

时间:2017-12-28 19:52:49

标签: javascript esri-maps

我已根据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文件中进行相同的更改,那么地图工作正常,但是你可以想象它不会长期工作。

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

1 个答案:

答案 0 :(得分:1)

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

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

  

./客户/ SRC /组件/通用/ 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] });
    }
  });