Apache flex Flex组件中的Google地图
我正在Flex中嵌入Google Maps Flash API,它在本地运行良好,带有水印,等等。当我将其上载到服务器(Flex.mydomain.com)时,我发现一个沙盒安全错误,如下所示:Apache flex Flex组件中的Google地图,apache-flex,actionscript-3,google-maps,Apache Flex,Actionscript 3,Google Maps,我正在Flex中嵌入Google Maps Flash API,它在本地运行良好,带有水印,等等。当我将其上载到服务器(Flex.mydomain.com)时,我发现一个沙盒安全错误,如下所示: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.swf?Fri, 12 Sep 2008 21:46:03 UTC cannot access http://
SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.swf?Fri, 12 Sep 2008 21:46:03 UTC cannot access http://maps.googleapis.com/maps/lib/map_1_6.swf. This may be worked around by calling Security.allowDomain.
at flash.display::Loader/get content()
at com.google.maps::ClientBootstrap/createFactory()
at com.google.maps::ClientBootstrap/executeNextFrameCalls()
有没有人有过将GoogleMapsFlashAPI嵌入Flex组件并专门设置安全设置的经验?我确实得到了一个新的API密钥,它已注册到我的域中,并且在发布时正在使用它
我尝试在主应用程序和组件中执行以下操作:
Security.allowDomain('*')
Security.allowDomain('maps.googleapis.com')
Security.allowDomain('mydomain.com')
这听起来像是一个与
crossdomain.xml
相关的问题。我做了一个快速搜索,似乎有许多人有相同的问题。通过XMLHttpRequest等执行一些代理请求
谢谢你的帮助。显然,这与在ASP.NET页面上包含Flex应用程序有关。当我把它移到一个简单的HTML文件时,它工作得很好。我现在没有时间进行全面调查,但这似乎已经解决了问题