Skip to content
andrewcottam edited this page May 21, 2011 · 10 revisions

Deployment

Server Requirements

The server must have the following software installed, licensed and working properly:

  • Microsoft SQL Server 2008 R2 Web Edition
  • ArcGIS Server 10 Advanced Edition
  • ArcSDE 10
  • PHP - a PHP page is used as a proxy to retrieve data from the Panoramio web service
  • Microsoft .NET Framework 3.5 runtime

In addition, in order to make administration of the Map Services easier it would be beneficial to have ArcGIS Desktop 10 Installed.

Configuration

SOAP Web Application

The Microsoft Visual Web Developer 2008 Express Edition project on wcmc-gis-03 contains the files necessary to setup the SOAP services. They are available in the \inetpub\csn\CSN_webservices folder. If they are not available they can be cloned from this GitHub repository: https://github.com/andrewcottam/CSN-SOAP-Services. Once these files are in place the web.config file must be edited to point to the SQL Server Database instance. It must log on as the SDE user.

PHP Files

There are a couple of PHP files that are needed for the application to function correctly. These are both available at the following GitHub repository: https://github.com/andrewcottam/PHP-Files

Firstly, the create.php file is used to create PDF files on the server for all of the reports in the web application. This file needs to be in the CSN\folder on the web server.

Secondly, the panoramio.php file is used as a proxy file to get Panoramio images for site polygons in the application. This file is needed to avoid the cross-domain issues that are caused by requesting the data from Panoramio directly from the Flash Application. This file also needs to be in the CSN\folder on the web server.

Flex Application

The Flex Application can be deployed using the following procedure. If the application has not been recompiled (i.e. it is just being from one machine to another) then you can go straight to the final step.

  1. In FlashBuilder compile the application (Project | Export Release build) to a suitable folder (e.g. /Users/andrewcottam/Sites/csn) - you will need to click on Choose Source Files… to make sure it compiles the source properly. Make sure that there are no Git locks otherwise it wont compile. If there are you need to delete them in Terminal.

  2. In the deployment folder delete the default.html file and rename the csn.html file to default.html

  3. Open the default.html file and paste in the following Google Tracking Code just before the '</head> section:

     <script type="text/javascript">
    
       var _gaq = _gaq || [];
       _gaq.push(['_setAccount', 'UA-17023211-1']);
       _gaq.push(['_trackPageview']);
    
       (function() {
         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
       })();
    
     </script>
    
  4. Rename the compiled csn.swf file to something new, e.g. CSNv2.swf

  5. Edit the default.html file and change all occurrences of the the old swf file to the new filename, e.g. swfobject.embedSWF("CSNv2.swf", "flashContent", "100%", "100%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);

  6. Save the container page and test in the browser.

  7. Copy all of the files and move to the web server.