3
我做地圖的一個非常標準裝載,如:Bing地圖V8沒有自動加載IE11
map = new Microsoft.Maps.Map(document.getElementById('map_canvas'));
在Chrome中它工作正常,但在IE11,我得到的地圖代碼的異常:
0x800a01b6 - JavaScript的運行時錯誤:對象不支持屬性或方法 'matchMedia'
Bing地圖代碼內的行是:
return window.matchMedia("(-ms-high-contrast:active)").matches
窗口變量是定義的,但如果我檢查它matchMedia是未定義的。
整個堆棧跟蹤是:
Unhandled exception at line 1, column 9149 in https://www.bing.com/rms/MapCoreBundle/jc,nj/81a88ae6/9adb7eaf.js?bu=rms+answers+MapsSDK+AnonymousBegin*MapCore.en*MapCoreBegin*LabelOptions*LocalStorageCache*Gimme*GimmeWrapper*evPromise*ExternalPromise*StaticPromise*CookiesHelper*LruCache*Point*Rectangle*NAARectangle*ResourceManager*Units*Anchor*Size*Binding*ChangeMagnitude*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*AltitudeReference*TransformCurve*GraphType*CurveKey*Curve*Color*CurveVector4*CurveColor*Vector4*CurveTangent*DiscreteRange*DiscreteRangeCollectionSpline*MapLayer*AutoScaling*PointLabelPlacementPreference*PolygonFillPreference*VerticalAlignment*CopyrightProvider*CopyrightProviderService*EntityState*MinZoomFraming*GeometryType*HitTestability*HorizontalAlignment*MapModeType*ViewChangeCause*MapFrameManager*LayerFrameManager*GoalCounter*FrameEventAggregator*DataMonitor*MapFrameData*LayerFrameData*Clipper*CompositePrimitiveSet*DataLoader*Differ*FixedPrimitiveSet*PrimitiveSubset*Overlay*OverlayAlignment*ImageryMapLayer*SimpleSceneContributor*VectorMapLayer*BasicMapAnimation*MapViewAnimator*BoundsAccumulator*CombinedLayerCollection*ConstrainViewArgs*LatLonCrs*LocationRect*Matrix2D*MapInstrumentationManager*Map*MapHelper*MapMath*MapLocation*MapType*MapTypeChangeArgs*MapTypeCollection*MapTypeId*MapView*MapEventForPrimitiveOverlay*MapQuadrant*PrimitiveOverlayHelper*OverlayBehavior*GeometryGeneralizer*SimplePointPrimitive*SimpleLinePrimitive*SimpleAreaPrimitive*MoveableSimplePointPrimitive*TargetViewChangeArgs*VectorMath*ViewChangeArgs*ZoomLevel*ZoomAroundLocationAnimator*ZoomEventArgs*OverviewMapMode*MapAuthentication*PublicApi*InternalApi*AnonymousEnd
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'matchMedia'
感謝您的幫助!
你釘了它!我的asp.net母版頁有: –
@MikeWitt樂意幫忙。有一個不錯的2017年! –