部署ARCGIS FLEX API应用程序需要注意的问题

来源:互联网 发布:新型网络传销模式 编辑:程序博客网 时间:2024/05/19 12:28

部署ARCGIS FLEX API应用程序需要注意的问题

1、为了提升应用程序性能,建议FLEX BUILDER设置。 

  • Click Project > Properties > Flex Compiler, then uncheck the Enable integration with browser navigation check box. Unless you have added code to specifically support deep links, there is no need for this box to be checked.
  • Click Project > Properties > Flex Build Path > Library Path and set Framework linkage to Runtime Shared Library (RSL). Read more about RSL, a new feature supported by Flash Player 9.0.115 and later.
  • Click Project > Properties > Flex Compiler and set the required Flash Player version to 9.0.115 or later.

2、编译生成优化的SWF文件

When you compile your application in Adobe Flex Builder 3, a debug version is created. While useful for development purposes, this is not optimal for deployments.

When you are ready to deploy your application, use Adobe's Flex Export Release Build process to create an optimized release-quality version of your SWF file:

  1. In Flex Builder 3, click Project > Export Release Build from the main menu.
  2. Click Finish.

3、工作流(是否需要CROSSDOMAIN.XML)

The compiled application (SWF file), its HTML wrapper, and its related files (e.g., shared libraries) can be moved onto any Web server. There are no dependencies on any additional files hosted by you, or ESRI, at runtime because the compiled SWF contains all the necessary code.

 

部署ARCGIS FLEX API应用程序需要注意的问题。

When a Web user accesses the HTML wrapper file, the browser will verify that Adobe Flash Player is installed and using the specified minimum Flash Player version. The client browser will then download the SWF file. After this point, the user might not connect back to this Web server at all but rather directly to the servers containing map content and tasks. Note that if your web application is not hosted on the same server as the ArcGIS Server, you will have to have a crossdomain.xml on the ArcGIS Server.

4、关于crossdomain.xml

To access data from a different server than the one hosting your Flex application, the remote server needs to have a cross-domain file in the root directory. For security reasons, the Web browser cannot access data that resides outside the exact Web domain where the SWF file originated. However, Adobe Flash Player can load data across domains if permission is granted from the server. This is accomplished by including a small crossdomain.xml file on the remote server that permits Flash to connect to services on that server. For instance:

<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-control permitted-cross-domain-policies="all"/> <allow-access-from domain="*"/> </cross-domain-policy>

For additional information, read Using cross-domain policy files in the Adobe Flex 3 Help, see the Adobe TechNote "External data not accessible outside a Macromedia Flash movie's domain," or view a sample cross-domain file.

5、部署crossdomain.xml

To deploy the cross-domain file on ArcGIS Server, see the instructions specific to your platform.

  • .NET
    Add crossdomain.xml to your Web server root directory, for example, C:/inetpub/wwwroot.
  • Java
    Add crossdomain.xml to <ArcGIS_Server_Install_Location>/ArcGIS/java/web_output, for example, C:/Program Files/ArcGIS/java/web_output
原创粉丝点击