必应地图 Web Control V7 JS 异常
Posted
技术标签:
【中文标题】必应地图 Web Control V7 JS 异常【英文标题】:Bing maps Web Control V7 JS Exception 【发布时间】:2018-04-20 22:03:44 【问题描述】:在我的应用程序中,我在女巫中使用 Bing Maps Web Control V7,我是新手。 近两周以来,我面临js级别的异常
无法读取未定义的属性“id”
我无法找到原因。 这是堆栈跟踪:
1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1 Uncaught TypeError: Cannot read property 'id' of undefined
at Function.n._clipExact (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at Function.n.clip (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at n.getPrimitives (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at n.getPrimitives (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at i._showLabelsForFrame (6fccc41e.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*LabelsPluginStart*LabelKey*LabelRegionBounds*Label*IconLabel*RelativePlacement*PointLabel*LineLabel*AreaLabel*ShieldLabel*CollisionIndex*CollisionManager*LabelerWorker*Labeler*LabelController*LabelCollider*LabelRenderer*CanvasLabelRenderer*VectorLabels*LabelsPluginEnd*AnonymousEnd:1)
at Array.<anonymous> (6fccc41e.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*LabelsPluginStart*LabelKey*LabelRegionBounds*Label*IconLabel*RelativePlacement*PointLabel*LineLabel*AreaLabel*ShieldLabel*CollisionIndex*CollisionManager*LabelerWorker*Labeler*LabelController*LabelCollider*LabelRenderer*CanvasLabelRenderer*VectorLabels*LabelsPluginEnd*AnonymousEnd:1)
at n.invoke (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at n._onLayerPrimitivesRendered (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at Array.<anonymous> (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
at n.invoke (1395e580.js?bu=rms+answers+MapsSDKRelease+AnonymousBegin*MapCore.fr*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Anchor*Size*Binding*EventBinding*Observable*ObservableObject*ObservableObjectChangedArgs*ObservableCollection*Debug*DelayLoadedObject*JSEvent*Dispatcher*WorkDispatcher*Iterator*ElementSizeHelper*GimmeExt*GimmeTransition*Helper*PerfState*ClientPerf*LoggingWrapper*LoggerConstants*Network*ThrottledEventInvoker*ObjectPool*StaticObjectPool*FixedSizeObjectPool*OrderedDictionary*PooledImage*Url*MapCoreMiddle*NavigationBarMode*NavigationBarOrientation*TransformCurve*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*CopyrightProvider*CopyrightProviderService*CustomMapStyleManager*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*PerfV2Logger*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd:1)
有人有想法吗? 谢谢!
【问题讨论】:
【参考方案1】:Bing 地图 V7 SDK 现已弃用一段时间,不再可用(一年多前宣布弃用)。自动重定向到 V8 以帮助尚未迁移的站点,但它不是 100% 兼容的。 您可能需要更新您的站点以使用 V8 地图控件 - 请参阅本指南: https://social.technet.microsoft.com/wiki/contents/articles/34563.bing-maps-v7-to-v8-migration-guide.aspx
【讨论】:
这就是问题所在,我通过将 WebControl 迁移到 V8 解决了它以上是关于必应地图 Web Control V7 JS 异常的主要内容,如果未能解决你的问题,请参考以下文章