Tuesday, October 16, 2007

Hey ArcGIS users

You can create an ArcGIS Server based layer using the AWX Flex API. In the below sample, I'm loading a layer from a specified endpoint and then when I click click on the button, I'm turning off the "water" layer in the ArcGIS group layer.

<?xml version="1.0" encoding="utf-8"?>
import mx.collections.ArrayCollection;
import mx.collections.ItemResponder;
import com.esri.aws.awx.map.layers.LayerVisibility;
private function turnWaterOff() : void
ags.getLayerVisibilities( new ItemResponder(
function(data : Object, token : Object = null) : void {
var arrCol : ArrayCollection = data as ArrayCollection;
for each ( var layerVisibility : LayerVisibility in arrCol)
if( layerVisibility.name == "Water")
layerVisibility.visible = false;
function(info : Object, token : Object = null) : void {
trace( info );
<framework:Framework apiKey="196405023"/>
<mx:Panel width="100%" height="100%">
<layers:ArcGISMapServerGroupLayer id="ags"
<mx:Button label="Turn Water Off" click="turnWaterOff()"/>


Danny said...

Does anything special need to be done to make this work on the ArcGIS Server side? I'm trying to do this based upon your example but the data object is always empty (0 length).

ThunderHead said...

Yes - in the current version we only support visibility on the top group layer :-(

Cole said...

I would like to use AWX as my front end to ArcGis Server. However, the performance in using the ArcGISserver grouplayer is slow for a complex mxd. Can you subclass the RasterTileLayer to use an ArcGis Server tile cache? If so can you get us started in the right direction on this. Thanks


Pawan said...

I have the ArcGIS and Flex setup working but not sure why the map is not being loaded from the cache. I have created a cache and have also loaded the same service as a java war file. When its loaded as the Java Application i can see the map as tiles but not when i make call from within the Flash palyer. I am making SOAP calls to the ArcGIS Maop Services by using

awx:ArcGISMapServerGroupLayer endpointURI="Some URL".

Thanks !!!

Jason said...

Figure out that cache issue? I am running into the same thing....It doesnt seem to be using the cache.

ThunderHead said...

Correct - in the current version, there is _only_ support for MapImage and it has to have a geographic projection.

Jason said...

.."in the current version"...

Of course, that last comment leads me to believe that there is something in the works...can to let something leak out?