Thursday, January 31, 2013

windows 8 jquery develop bingmap error log

Error:

SCRIPT5007: 未经处理的异常,行 1,列 46945,在 ms-appx://pk17s.cn.pkmap/Bing.Maps.JavaScript//js/veapicore.js 中
0x800a138f - JavaScript 运行时错误: 无法获取未定义或 null 引用的属性“setView”
文件: veapicore.js,行: 1,列: 46945

fixed:

 

Error:

APPHOST9601: 无法加载 <http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0>。应用无法在本地上下文中加载远程 Web 内容。
文件: default.html

说明:

使用iframe包起来的内容为webcontext,其他默认为local context.其权限:

 

General features and restrictions

This table describes some of the features and restrictions that are available depending on whether the page is running in the local or web context.

Feature
Local context
Web context

Windows Runtime
Yes
No

Windows Library for JavaScript
Yes
Yes*

(See the Windows Library for JavaScript in the web context section for details.)

JavaScript URIs

(attribute="javascript:code")

No

A URI can refer to defined JavaScript functions (attribute="myFunction()"), but can't be a JavaScript statement ( attribute="javascript: 2 + 2;").

Yes

Data URIs ("data:" ) for fonts
No
Yes

External script references (<script src="http://*" /> )
No

Script must come from locally packaged content.

Yes

window.close
Yes

Important  While you can technically use window.close in a local context, we don't recommend it. It will generate an error and cause the Windows Store to reject the app.

No

Cross-domain XHR requests
Yes
No

Automatic toStaticHTMLvalidation
Yes
No

Application Cache
Yes
Yes

Cross-domain XHR requests
Yes
No

Windows Library for JavaScript in the web context

Although you can use Windows Library for JavaScript in the web context, some of its APIs work differently because the web context does not have access the Windows Runtime. Here are some of the APIs that are affected:

API
Behavior changes in the web context

WinJS.UI.AppBar

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.
  • Does not listen to Windows Runtime events.

WinJS.UI.ListView

  • Does not use user-customizable system metrics and animation settings. Intead, the control falls back to default Windows Library for JavaScript settings.

WinJS.UI.Rating

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.

WinJS.UI.SettingsFlyout

  • This control is not available in the web context.

WinJS.UI.StorageDataSource

  • This data source is not available in the web context.

WinJS.UI.ToggleSwitch

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.

WinJS.UI.Tooltip

  • Does not use user-customizable system metrics and animation settings. Intead, the control falls back to default Windows Library for JavaScript settings.
  • Does not get the user's handedness. The control assumes the user is right-handed.

No comments: