POST
|
I'm using Kerry Coffin's and ad_giles@hotmail.com's widgets and FlexProjections.swc as a base to try and make a tool that can draw on the map a grid in UTM Zone 35N and a LatLong grid. My maps are in UTM 35N but I can't seem to make the right conversion to WGS84 to display the LatLong grid. And as for the UTM grid - I'm not sure if that is possible with this library(maybe some heavy modfication of the MGRS Layer as they are supposed to be similar). This is the most recent try to get the right projection to the graticule layer and display the LatLong grid:
import com.esri.ags.geod.Ellipsoid;
import com.esri.ags.geod.IProjection;
var a:Number = 6378137;
var inverseF:Number = 298.257223563;
var wktName:String = "Ellipsoid R=WGS84";
var newEllipsoid:Ellipsoid = new Ellipsoid(a,inverseF,wktName);
var newIProj:IProjection = MoreUtils.getUTMProjection(32635, false, newEllipsoid);
graticuleLayer.projection = newIProj; The code is in the function that initializes on creationComplete (or widgetConfigLoaded="basewidget_widgetConfigLoadedHandler(event)" in the widget) and creates the instances of the MGRS and Graticule Layers
... View more
03-28-2013
10:42 AM
|
0
|
0
|
225
|
POST
|
Thanks for the help ibespalov. I haven't stumbled on these video lessons before.
... View more
05-08-2012
04:15 AM
|
0
|
0
|
278
|
POST
|
gis-varna, sample - sources via bindable attributes or dispatch/listen events Thank you for the examples I tried to do the task with the custom event method, but in order to use the custom event I have to import one of the mxml-s as a custom component. I couldn't do that so I tried to move the combobox to the main mxml and try to call the custom event from there but got an error that I didn't work out: 1061: Call to a possibly undefined method transferCurrentLayer through a reference with static type Class. Any idea what I am doing wrong? This is the zip with the mentioned project: http://dl.dropbox.com/u/5683647/InfoWindow_single_XML.zip
... View more
05-08-2012
02:40 AM
|
0
|
0
|
278
|
POST
|
Hello, I am trying to modify a widget for use in a flex app. I have a mxml that makes a query over a feature layer. All the feature layers are in a XML and can be changed depending on what query you want. I want to pass the result fields from the query to another mxml that is the infoWindowRenderer and is supposed to show an info window with the the data of the query. Tried the get/set methods but that didn't work. Any idea about the communication between the mxml's? This is the link to the source project: http://dl.dropbox.com/u/5683647/InfoWindow.zip
... View more
05-06-2012
11:43 PM
|
0
|
4
|
832
|
POST
|
Hi, I'm trying to get the Viewer widget, called "Selection", to work outside the Viewer in a native app. I was able to get everything, except the infowindow popup, to work. The infowindow popup is functioning differently than the widgets, because it's a universal part of the Viewer, inteded to be used by every widget that needs it. It uses AppEvent and EventBus classes to work. It changes info in the popup depending on the layer and fields selected in the widget and I wasn't able to figure out how to use the standard InfoWindow classes of the argis' flex library. Has anybody tried to use the infowindow outside the Viewer? Thanks for the help!
... View more
12-11-2011
09:58 PM
|
0
|
1
|
476
|
POST
|
Hello, I'm trying to create a Flex app in which I can use the DrawTool and EditTool to add and edit different shapes of polygons to a Feature Layer. I'm using two ESRI examples - "Editing a feature layer without the Editor component" and "Edit graphics with the EditTool". I managed to get the DrawTool to draw circles and add them to the FeatureLayer, but first you have to click on a FeatureLayer symbol. I have only one symbol and want it to be turned on all the time. And after you click on the FeatureLayer symbol and then on the desired shape and you actually start to draw a shape - you can't see what you are drawing until the drawing is complete and you see only the finished result. I'm struggling to see what I have to change to eliminate these problems. I'm attaching the mxml, if anybody can help.
... View more
08-10-2011
12:30 AM
|
0
|
0
|
635
|
POST
|
Hello, I have a problem that I am struggling to overcome for some time I want to extract data using part of the model "Clip and Ship" and export them to a .dxf file and use this finction in Flex. I am using the sample for script "Export to CAD (Conversion)". I am using Feature layer for a input parameter, which is from a part of a database. The model is workng from the computer I am working on, but after publishing it to the server (ver 9.3.1) the only working part of the script is the clip and ship - it creates a database with the clipped area and finishes the process without giving any errors. It doesn't create any DXF file. This is the code I am using in the script for conversion. # Purpose: To Export to an AutoCad file, with each layer being created from the Name field in the feature class.
# Create the Geoprocessor object
import arcgisscripting, os
gp = arcgisscripting.create()
# Local variables...
data_DXF = "//<path>/togo23.dxf"
try:
# Process: Export to CAD...
gp.ExportCAD_conversion("'//<path>/varna_gp_gdb.gdb/cadaster'", "DXF_R2007", data_DXF, "Use_Filenames_in_Tables", "Overwrite_Existing_Files", "")
except:
# If an error occurs while running a tool print the message
print gp.GetMessages() I have included all the code of the model in the attaced zip file "help"
... View more
02-27-2011
12:15 AM
|
0
|
1
|
2201
|
POST
|
Hello, I have a problem that I am struggling to overcome for some time I want to extract data using part of the model "Clip and Ship" and export them to a .dxf file. I am using the sample for script "Export to CAD (Conversion)". I am using Feature layer for a input parameter, which is from a part of a database. The model is workng from the computer I am working on, but after publishing it to the server (ver 9.3.1) the only working part of the script is the clip and ship - it creates a database with the clipped area and finishes the process without giving any errors. It doesn't create any DXF file. This is the code I am using in the script for conversion. # Purpose: To Export to an AutoCad file, with each layer being created from the Name field in the feature class.
# Create the Geoprocessor object
import arcgisscripting, os
gp = arcgisscripting.create()
# Local variables...
data_DXF = "//<path>/togo23.dxf"
try:
# Process: Export to CAD...
gp.ExportCAD_conversion("'//<path>/varna_gp_gdb.gdb/cadaster'", "DXF_R2007", data_DXF, "Use_Filenames_in_Tables", "Overwrite_Existing_Files", "")
except:
# If an error occurs while running a tool print the message
print gp.GetMessages() I have included all the code of the model in the attaced zip file "help"
... View more
02-25-2011
06:02 AM
|
0
|
0
|
523
|
POST
|
Hi, I got some progress on the InfoWindow and now there is a moOver an mouseOut events that should open it, but whe you put your mouse on the symbol it starts flickering because it's executing mouseOver and mouseOut endlessly. Maybe it's too sensitive and you have to be exact on the point. Does anyone have an idea how to modify the mouse events to make them "less sensitive" or something? Here is the modified code: <?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:esri="http://www.esri.com/2008/ags"
layout="horizontal"
pageTitle="3 / query by extent"
initialize="initApp()">
<mx:Script>
<![CDATA[
import mx.effects.Glow;
import mx.events.EffectEvent;
import mx.events.ListEvent;
import com.esri.ags.Graphic;
import com.esri.ags.events.DrawEvent;
import com.esri.ags.events.ExtentEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.tasks.Query;
import com.esri.ags.tasks.FeatureSet;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.AsyncResponder;
import mx.managers.ToolTipManager;
private function initApp():void {
ToolTipManager.showDelay = 0;// Display immediately.
}
[Bindable] private var hashmapOfExistingGraphics : Object=new Object();
private function onExtentChange(event:ExtentEvent):void
{
query.geometry = myMap.extent;
queryTask.execute(query, new AsyncResponder( onResult, onFault ));
}
private function onResult( featureSet : FeatureSet, token : Object = null ) : void
{
for each ( var myGraphic : Graphic in featureSet.features )
{
// only add features that are not already in the graphics layer
var graphicID:String=myGraphic.attributes.HotSpot + "." + myGraphic.attributes.FID;
if ( ! hashmapOfExistingGraphics[graphicID] )
{
// New feature (not already added to graphics layer
hashmapOfExistingGraphics[graphicID]=1;
myGraphic.symbol = defaultSymbol;
myGraphic.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
myGraphic.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
myGraphic.id = graphicID;
myGraphic.toolTip = myGraphic.attributes.CITY_NAME;
myGraphicsLayer.add( myGraphic );
}
}
var extent : Extent = myMap.extent;
var graphic : Graphic;
var results : ArrayCollection = new ArrayCollection;
for (var i : Number = 0 ; i < myGraphicsLayer.numChildren ; i++)
{
graphic = myGraphicsLayer.getChildAt(i) as Graphic;
trace("GG:" + graphic.geometry );
if (extent.contains(MapPoint(graphic.geometry)))
{
results.addItem(graphic.attributes);
}
}
dg.dataProvider = results;
}
private function onFault( info : Object, token : Object = null ) : void
{
Alert.show( info.toString() );
}
public function onMouseOver( event : MouseEvent ) : void
{
var graphic : Graphic = event.currentTarget as Graphic;
graphic.symbol = myInfoSymbol;
}
public function onMouseOut( event : MouseEvent ) : void
{
//var graphic : Graphic = event.currentTarget as Graphic;
//graphic.symbol = highlightedSymbol;
Graphic( event.target ).symbol = highlightedSymbol;
//myGraphicsLayer.clear();
}
private function onItemRollOver( event : ListEvent ) : void
{
var gr: Graphic = findGraphicByAttribute(event.itemRenderer.data)
gr.symbol = highlightedSymbol;
var glow:Glow = new Glow(gr);
glow.duration = 2000 ;
glow.alphaFrom = 1 ;
glow.alphaTo = 0 ;
glow.blurXFrom = 10 ;
glow.blurXTo = 0 ;
glow.blurYFrom = 20 ;
glow.blurYTo = 0 ;
glow.strength = 100;
glow.color = redFill.color;
glow.play();
}
private function onItemRollOut( event : ListEvent ) : void
{
findGraphicByAttribute(event.itemRenderer.data).symbol = defaultSymbol;
}
public function findGraphicByAttribute( attributes : Object ) : Graphic
{
for each( var graphic : Graphic in myGraphicsLayer.graphicProvider)
{
if ( graphic.attributes["CITY_NAME"] == attributes["CITY_NAME"])
{
return graphic;
}
}
return null;
}
public function findInList( graphic : Graphic ) : int
{
for each( var attributes : Object in dg.dataProvider )
{
if (attributes === graphic.attributes)
{
return (dg.dataProvider as ArrayCollection).getItemIndex(attributes)
}
}
return -1;
}
]]>
</mx:Script>
<esri:SimpleFillSymbol id="redFill" alpha="0.5" color="0xFF0000"/>
<!-- setup stuff -->
<esri:QueryTask id="queryTask" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"/>
<esri:Query id="query" outFields="CITY_NAME, STATE_NAME, ELEVATION, FID" returnGeometry="true" />
<esri:SimpleMarkerSymbol id="defaultSymbol" color="0x0000FF" style="triangle" size="20" />
<esri:SimpleMarkerSymbol id="highlightedSymbol" color="0xFF0000" style="triangle" size="20" />
<esri:InfoSymbol id="myInfoSymbol">
<esri:infoRenderer>
<mx:Component >
<mx:VBox label="{data.CITY_NAME}" backgroundColor="0xEEEEEE">
<mx:Label text="Name: {data.CITY_NAME}"/>
<mx:Label text="State: {data.STATE_NAME}"/>
<mx:Label text="Elevation: {data.ELEVATION}"/>
</mx:VBox>
</mx:Component>
</esri:infoRenderer>
</esri:InfoSymbol>
<!-- visual stuff -->
<esri:Map id="myMap" extentChange="onExtentChange(event)">
<esri:extent>
<esri:Extent xmin="-125.9" ymin="44.6" xmax="-114.6" ymax="50.2">
<esri:spatialReference>
<esri:SpatialReference wkid="4326"/>
</esri:spatialReference>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer
url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:GraphicsLayer id="myGraphicsLayer"/>
</esri:Map>
<mx:VBox width="260" height="100%" backgroundColor="#FCFCFC" fontWeight="bold">
<mx:DataGrid id="dg" width="100%" height="100%" itemRollOver="onItemRollOver(event)" itemRollOut="onItemRollOut(event)">
<mx:columns>
<!-- <mx:DataGridColumn dataField="Cities In View Extent" /> -->
<mx:DataGridColumn headerText="City Name" dataField="CITY_NAME"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Application>
... View more
12-08-2010
11:56 PM
|
0
|
0
|
146
|
POST
|
Hello, I'm trying to modify an interesting example from ESRI that shows some points on a map and only the visible ones that are on the screen in a DataGrid on the right. There is an InfoSymbol in the app but it's not connected to anything. I tried to connect it to a mouseOver event but I can't get it to open. Can somebody help? <?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:esri="http://www.esri.com/2008/ags"
layout="horizontal"
pageTitle="3 / query by extent"
initialize="initApp()">
<mx:Script>
<![CDATA[
import mx.effects.Glow;
import mx.events.EffectEvent;
import mx.events.ListEvent;
import com.esri.ags.Graphic;
import com.esri.ags.events.DrawEvent;
import com.esri.ags.events.ExtentEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.tasks.Query;
import com.esri.ags.tasks.FeatureSet;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.AsyncResponder;
import mx.managers.ToolTipManager;
private function initApp():void {
ToolTipManager.showDelay = 0;// Display immediately.
}
[Bindable] private var hashmapOfExistingGraphics : Object=new Object();
private function onExtentChange(event:ExtentEvent):void
{
query.geometry = myMap.extent;
queryTask.execute(query, new AsyncResponder( onResult, onFault ));
}
private function onResult( featureSet : FeatureSet, token : Object = null ) : void
{
for each ( var myGraphic : Graphic in featureSet.features )
{
// only add features that are not already in the graphics layer
var graphicID:String=myGraphic.attributes.HotSpot + "." + myGraphic.attributes.FID;
if ( ! hashmapOfExistingGraphics[graphicID] )
{
// New feature (not already added to graphics layer
hashmapOfExistingGraphics[graphicID]=1;
myGraphic.symbol = defaultSymbol;
myGraphic.id = graphicID;
myGraphic.toolTip = myGraphic.attributes.CITY_NAME;
myGraphicsLayer.add( myGraphic );
}
}
var extent : Extent = myMap.extent;
var graphic : Graphic;
var results : ArrayCollection = new ArrayCollection;
for (var i : Number = 0 ; i < myGraphicsLayer.numChildren ; i++)
{
graphic = myGraphicsLayer.getChildAt(i) as Graphic;
trace("GG:" + graphic.geometry );
if (extent.contains(MapPoint(graphic.geometry)))
{
results.addItem(graphic.attributes);
}
}
dg.dataProvider = results;
}
private function onFault( info : Object, token : Object = null ) : void
{
Alert.show( info.toString() );
}
private function onItemRollOver( event : ListEvent ) : void
{
var gr: Graphic = findGraphicByAttribute(event.itemRenderer.data)
gr.symbol = highlightedSymbol;
var glow:Glow = new Glow(gr);
glow.duration = 2000 ;
glow.alphaFrom = 1 ;
glow.alphaTo = 0 ;
glow.blurXFrom = 10 ;
glow.blurXTo = 0 ;
glow.blurYFrom = 20 ;
glow.blurYTo = 0 ;
glow.strength = 100;
glow.color = redFill.color;
glow.play();
}
private function onItemRollOut( event : ListEvent ) : void
{
findGraphicByAttribute(event.itemRenderer.data).symbol = defaultSymbol;
}
public function findGraphicByAttribute( attributes : Object ) : Graphic
{
for each( var graphic : Graphic in myGraphicsLayer.graphicProvider)
{
if ( graphic.attributes["CITY_NAME"] == attributes["CITY_NAME"])
{
return graphic;
}
}
return null;
}
public function findInList( graphic : Graphic ) : int
{
for each( var attributes : Object in dg.dataProvider )
{
if (attributes === graphic.attributes)
{
return (dg.dataProvider as ArrayCollection).getItemIndex(attributes)
}
}
return -1;
}
]]>
</mx:Script>
<esri:SimpleFillSymbol id="redFill" alpha="0.5" color="0xFF0000"/>
<!-- setup stuff -->
<esri:QueryTask id="queryTask" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"/>
<esri:Query id="query" outFields="CITY_NAME, STATE_NAME, ELEVATION, FID" returnGeometry="true" />
<esri:SimpleMarkerSymbol id="defaultSymbol" color="0x0000FF" style="triangle" size="20" />
<esri:SimpleMarkerSymbol id="highlightedSymbol" color="0xFF0000" style="triangle" size="20" />
<esri:InfoSymbol id="myInfoSymbol">
<esri:infoRenderer>
<mx:Component >
<mx:VBox label="{data.CITY_NAME}" backgroundColor="0xEEEEEE">
<mx:Label text="Name: {data.CITY_NAME}"/>
<mx:Label text="State: {data.STATE_NAME}"/>
<mx:Label text="Elevation: {data.ELEVATION}"/>
</mx:VBox>
</mx:Component>
</esri:infoRenderer>
</esri:InfoSymbol>
<!-- visual stuff -->
<esri:Map id="myMap" extentChange="onExtentChange(event)">
<esri:extent>
<esri:Extent xmin="-125.9" ymin="44.6" xmax="-114.6" ymax="50.2">
<esri:spatialReference>
<esri:SpatialReference wkid="4326"/>
</esri:spatialReference>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer
url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:GraphicsLayer id="myGraphicsLayer"/>
</esri:Map>
<mx:VBox width="260" height="100%" backgroundColor="#FCFCFC" fontWeight="bold">
<mx:DataGrid id="dg" width="100%" height="100%" itemRollOver="onItemRollOver(event)" itemRollOut="onItemRollOut(event)">
<mx:columns>
<!-- <mx:DataGridColumn dataField="Cities In View Extent" /> -->
<mx:DataGridColumn headerText="City Name" dataField="CITY_NAME"/>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
</mx:Application>
... View more
12-08-2010
01:44 AM
|
0
|
1
|
1906
|
POST
|
gis-varna, You are going to have to check the visibleLayers property of each map service that is in the map, and use those results to set the identify parameters layerIds property. There are lots of different version of identify widgets out there in the forums and code gallery many by me and some by others that you can look at for code examples. Thank you very much Robert for all your help! I found this thread --> http://forums.esri.com/Thread.asp?c=158&f=2421&t=297427#945543 and they talk about a similar thing, but they mention an example you wrote and I sttruggle to find it. Can you please provide me with a link to the mentioned example? Best Regards
... View more
11-03-2010
06:53 AM
|
0
|
0
|
211
|
POST
|
Hi all, I want to modify the "Identify Features" sample to use the dynamic service that is loaded in the begginig of the app and linked to the TOC menu instead of the driect link in <esri:IdentifyTask id="identifyTask"> that it's using now. That way the users can get to the layer they want by switching off other in the TOC and the Identify it. I chaged it a bit but I get an RPC error when I try to identify Here are the changes I made: <?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:esri="http://www.esri.com/2008/ags"
layout="vertical"
styleName="plain"
pageTitle="Identify Features on the Map">
<!--
This sample shows how to identify features with a MapClick and the Identify task.
The IdentifyParameters designate which layers are being identified.
Identify operations can potentially return a lot of information
depending on the number of layers being identified and a given tolerance.
The tolerance is the number of pixels a feature is allowed to lie away
from the clicked point in order to be counted as a result.
In this sample, when user clicks the map, an "Identify" task is executed.
When the task finishes executing, the identifyCompleteHandler function loops
through the features in the IdentifyResult and adds them to the map.
-->
<mx:Script>
<![CDATA[
import com.esri.ags.Graphic;
import com.esri.ags.events.MapMouseEvent;
import com.esri.ags.geometry.Geometry;
import com.esri.ags.symbol.InfoSymbol;
import com.esri.ags.tasks.IdentifyParameters;
import com.esri.ags.tasks.IdentifyResult;
import mx.collections.ArrayCollection
import mx.controls.Alert;
import mx.rpc.AsyncResponder;
[Bindable]
private var lastIdentifyResultGraphic:Graphic;
[Bindable]private var DynamicLayer:ArcGISDynamicMapServiceLayer = ArcGISDynamicMapServiceLayer(dynamic1);
//[Bindable]private var DynamicLayerUrl:String= DynamicLayer.url;
//[Bindable]private var visibleLayers:ArrayCollection = DynamicLayer.visibleLayers;
private function mapClickHandler(event:MapMouseEvent):void
{
clickGraphicsLayer.clear();
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 3;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_TOP;
identifyParams.width = myMap.width;
identifyParams.height = myMap.height;
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = myMap.extent;
identifyParams.spatialReference = myMap.spatialReference;
var clickGraphic:Graphic = new Graphic(event.mapPoint, clickPtSym);
identifyTask.execute(identifyParams, new AsyncResponder(myResultFunction, myFaultFunction, clickGraphic));
clickGraphicsLayer.add(clickGraphic);
}
private function myResultFunction(results:Array, clickGraphic:Graphic = null):void
{
if (results && results.length > 0)
{
var result:IdentifyResult = results[0];
var resultGraphic:Graphic = result.feature;
switch (resultGraphic.geometry.type)
{
case Geometry.MAPPOINT:
{
resultGraphic.symbol = smsIdentify;
break;
}
case Geometry.POLYLINE:
{
resultGraphic.symbol = slsIdentify;
break;
}
case Geometry.POLYGON:
{
resultGraphic.symbol = sfsIdentify;
break;
}
}
lastIdentifyResultGraphic = resultGraphic;
// update clickGraphic (from mouse click to returned feature)
clickGraphic.symbol = new InfoSymbol(); // use default renderer
clickGraphic.attributes = resultGraphic.attributes;
}
}
private function myFaultFunction(error:Object, clickGraphic:Graphic = null):void
{
Alert.show(String(error), "Identify Error");
}
]]>
</mx:Script>
<!-- start declarations -->
<!-- Symbol for where the user clicked -->
<esri:SimpleMarkerSymbol id="clickPtSym" style="x" color="0xFF0000" size="12"/>
<!-- Symbol for Identify Result as Polyline -->
<esri:SimpleLineSymbol id="slsIdentify" style="solid" color="0x00FF00" width="2" alpha="1"/>
<!-- Symbol for Identify Result as Point -->
<esri:SimpleMarkerSymbol id="smsIdentify" style="diamond" color="0x00FF00" size="15"/>
<!-- Symbol for Identify Result as Polygon -->
<esri:SimpleFillSymbol id="sfsIdentify"/>
<!-- Identify Task -->
<esri:IdentifyTask id="identifyTask"
concurrency="last"
url="{DynamicLayer}"/>
<!-- end declarations -->
<esri:Map id="myMap" mapClick="mapClickHandler(event)">
<esri:extent>
<esri:Extent xmin="-120" ymin="30" xmax="-100" ymax="50">
<esri:SpatialReference wkid="4326"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer id="dynamic1"
url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:GraphicsLayer graphicProvider="{lastIdentifyResultGraphic}"/>
<esri:GraphicsLayer id="clickGraphicsLayer"/>
</esri:Map>
</mx:Application>
... View more
11-03-2010
05:49 AM
|
0
|
1
|
369
|
POST
|
gis-varna, That code is over 2 years old... Are you sure you want to use it as a source for current development? That is a good point. I guess I'll have to use "Identify Parameters" example. Is there a way for this "Identify Parameters" example to be changed to get info directly from the Dynamic map, because I want it to see the changes when somebody turns off a layer from the TOC?
... View more
11-03-2010
04:57 AM
|
0
|
0
|
211
|
POST
|
Hi to all, I found this example --> http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=15824 and it contains a lot of useful features. The one that we are most interested at is the ID Features tool that identifies all layers. The problem is that, when debugged the application gives out this error : RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt() at mx.core::UIComponent/addChildAt() at com.esri.ags.layers::GraphicsLayer/collectionAddHandler() at com.esri.ags.layers::GraphicsLayer/collectionChangeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ListCollectionView/dispatchEvent() at mx.collections::ListCollectionView/addItemsToView() at mx.collections::ListCollectionView/listChangeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ArrayList/internalDispatchEvent() at mx.collections::ArrayList/addItemAt() at mx.collections::ListCollectionView/addItemAt() at mx.collections::ListCollectionView/addItem() at com.esri.ags.layers::GraphicsLayer/add() at com.DragPanel::IDResults/identifyCompleteHandler() at com.DragPanel::IDResults/__identifyTask_identifyComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.esri.ags.tasks::IdentifyTask/handleDecodedObject() at Function/http://adobe.com/AS3/2006/builtin::call() at com.esri.ags.tasks::BaseTask/handleResult() at Function/<anonymous>() at mx.rpc::Responder/result() at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult() at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders() at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() and after that another one: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild() at mx.core::UIComponent/removeChild() at mx.core::UIComponent/addChildAt() at com.esri.ags.layers::GraphicsLayer/collectionAddHandler() at com.esri.ags.layers::GraphicsLayer/collectionChangeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ListCollectionView/dispatchEvent() at mx.collections::ListCollectionView/addItemsToView() at mx.collections::ListCollectionView/listChangeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ArrayList/internalDispatchEvent() at mx.collections::ArrayList/addItemAt() at mx.collections::ListCollectionView/addItemAt() at mx.collections::ListCollectionView/addItem() at com.esri.ags.layers::GraphicsLayer/add() at com.DragPanel::IDResults/identifyCompleteHandler() at com.DragPanel::IDResults/__identifyTask_identifyComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.esri.ags.tasks::IdentifyTask/handleDecodedObject() at Function/http://adobe.com/AS3/2006/builtin::call() at com.esri.ags.tasks::BaseTask/handleResult() at Function/<anonymous>() at mx.rpc::Responder/result() at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult() at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders() at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at DirectHTTPMessageResponder/completeHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Has anyone used this code and found a solution or knows a way to work around it? Thank you!
... View more
11-02-2010
09:26 AM
|
0
|
5
|
464
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|