<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:framework="com.esri.aws.osgi.framework.*"
xmlns:services="com.esri.aws.services.*"
xmlns:map="com.esri.aws.awx.map.*"
xmlns:layers="com.esri.aws.awx.map.layers.*"
layout="absolute"
>
<mx:Script>
<![CDATA[
import com.esri.aws.services.SpatialQueryOptions;
import com.esri.aws.services.ISpatialQuery;
import com.esri.aws.services.PlaceFinderOptions;
import mx.collections.ItemResponder;
import com.esri.aws.services.IPlaceFinder;
import flash.utils.getQualifiedClassName;
import com.esri.aws.osgi.framework.IServiceReference;
private function doSpatialQuery() : void
{
var ref : IServiceReference = framework.systemContext.getServiceReference(getQualifiedClassName(ISpatialQuery));
var spatialQuery : ISpatialQuery = framework.systemContext.getService( ref ) as ISpatialQuery;
var point : Point = new Point(map.centerLon, map.centerLat);
var spatialQueryOptions : SpatialQueryOptions = new SpatialQueryOptions();
spatialQueryOptions.dataSource = "ArcWeb:BR.DetailedParcels.CA";
spatialQuery.findFeaturesByPoint( point, spatialQueryOptions, new ItemResponder(
function( data : Object, token : Object = null ) : void
{
trace( data );
},
function( info : Object, token : Object = null ) : void
{
trace( info );
}
));
}
]]>
</mx:Script>
<framework:Framework id="framework" apiKey="19640523">
<services:SpatialQueryActivator/>
</framework:Framework>
<mx:Panel width="100%" height="100%">
<map:Map id="map">
<map:basemaps>
<layers:VectorGroupLayer id="parcels" dataSource="ArcWeb:BR.Parcels.US" autoLoadLayerVisibilities="false"/>
</map:basemaps>
</map:Map>
<mx:ControlBar>
<mx:Button label="Find Parcel" click="doSpatialQuery()"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>
Friday, August 24, 2007
How to get parcel information ?
Labels:
parcels,
SpatialQuery
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment