Packagecom.esri.aws.services
Classpublic class Site

Contains the area of the report. Input request for Report.

View the examples.



Public Properties
 PropertyDefined by
  calcType : String
The type of rings.
Site
  polygons : Array
The array of polygon areas for the report.
Site
  ringRadii : Array
The array of radii for the rings.
Site
  ringUnits : String
The units for the ring's radius.
Site
  siteLocation : GeoPoint
The x,y coordinates of the site.
Site
  siteName : String
The site name.
Site
Property detail
calcTypeproperty
public var calcType:String

The type of rings. Valid values are "solid" or "hollow". Used with the methods getCustomSiteReport and getSiteReports.

The default value is "solid".

polygonsproperty 
public var polygons:Array

The array of polygon areas for the report. The report can contain polygons or ringRadii but not both.

ringRadiiproperty 
public var ringRadii:Array

The array of radii for the rings. The report can contain ringRadii or polygons but not both.

ringUnitsproperty 
public var ringUnits:String

The units for the ring's radius. Valid values are "km" (kilometers) or "miles".

The default value is "miles".

siteLocationproperty 
public var siteLocation:GeoPoint

The x,y coordinates of the site. Used to define either the center of the rings or a reference point for the polygons (it does not define the geometry of the polygons).

siteNameproperty 
public var siteName:String

The site name. On site reports, the site name appears as the header of the report. On site map reports, the site name appears as the label for the point (site) on the map.

Examples
Basic_Report_getSiteReports
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:awx="http://www.arcwebservices.com/2007/awx"
    pageTitle="Basic Site Demographic Report"
    implements="mx.rpc.IResponder"
    creationComplete="onComplete()"
    >
    <mx:Script>
        <![CDATA[
            import com.esri.aws.awx.geom.GeoPoint;
            import com.esri.aws.osgi.framework.ServiceTracker;
            import com.esri.aws.osgi.framework.IServiceReference;
            import com.esri.aws.services.IReport;
            import com.esri.aws.services.ReportInfo;
            import com.esri.aws.services.ReportOptions;
            import com.esri.aws.services.Site;
            import flash.utils.getQualifiedClassName;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.rpc.IResponder;

            private var m_report:ReportInfo;
            private var reportTracker:ServiceTracker;
            
            private function onComplete():void
            {
                reportTracker = new ServiceTracker(Framework.getInstance().systemContext, getQualifiedClassName(IReport));
                reportTracker.open();                
            }

            private function getSiteReport():void
            {
                var reportService:IReport = reportTracker.getService() as IReport;
                
                if (reportService)
                {                    
                    var site:Site = new Site();
                    site.siteLocation = new GeoPoint(-117.18908, 34.055219);
                    site.ringRadii = [2];
                    site.ringUnits = "miles";
                    site.siteName = "Location #1";
                    var rOptions:ReportOptions = new ReportOptions;
                    rOptions.dataSource = "ArcWeb:ESRI.TapestryAreaProfile.US";
                    rOptions.reportFormat='pdf';
                    reportService.getSiteReports(site,[rOptions],false,this);
                    m_info.htmlText = "Creating report ...";
                }
            }
            public function result(data:Object):void
            {
                var reports:ArrayCollection = ArrayCollection(data);
                m_report = reports.getItemAt(0) as ReportInfo;
                m_info.htmlText = "Site report in " + m_report.reportFormat + " format using the '" + m_report.dataSource
                                + "' data source:<br><u><a href='" + m_report.reportURL + "'>" + m_report.reportURL + "</a></u>";
            }
            public function fault(info:Object):void
            {
                Alert.show(info.toString());
            }
        ]]>
    </mx:Script>
    <awx:Framework id="m_framework" apiKey="[MY-API-KEY]">
        <awx:ReportActivator/>
    </awx:Framework>
    <mx:Button click="getSiteReport()" label="Click to create a 2-mile site report" fontSize="14" />
    <mx:Text id="m_info" fontSize="14" text=" "/>
</mx:Application>