|
POST
|
I added an Identify Widget to the Code Gallery http://www.arcgis.com/home/item.html?id=952242d872654661984c7d7e183d2183 The actual Identify tool is just a component added to the widget, so there are no Flexviewer dependencies, so it should port over fairly easily when Flexviewer 2 gets updated. It may not work exactly how most people would use it, but it works great for our particular workflow here in the office.
... View more
09-21-2010
09:18 AM
|
0
|
0
|
780
|
|
POST
|
That's the source code for the FlexViewer that can be customized to your liking. However if you'd like the API used to build the FlexViewer you'll want to get the API from here http://resources.arcgis.com/content/arcgis-flex-api-how-to-download That will alllow you to build an application from scratch.
... View more
09-17-2010
07:58 AM
|
0
|
0
|
768
|
|
POST
|
Are you using FlashBuilder 4 to import the project? If you are using FlashBuilder 3, I think you'll need to unzip the file and import the folder. There is a readme.txt in the src zip file that tells you how to import the project into FB4. And you used this link for the source, correct? http://www.arcgis.com/home/item.html?id=3f6a0bfee48949a88df50bf7686ec72a
... View more
09-17-2010
05:50 AM
|
0
|
0
|
768
|
|
POST
|
If you're already hiding the logo and trying to add yours, but still get that error, sometimes this unable to resolve 'assets/images/NEW_ITRE_LOGO1.png' for transcoding Can be fixed by adding a "/" at the beginning. unable to resolve '/assets/images/NEW_ITRE_LOGO1.png' for transcoding It's happened to me before with Embeds.
... View more
09-15-2010
02:01 PM
|
0
|
0
|
840
|
|
POST
|
So after your queries are done, you'd have something like this. DataGrid1 STOPID 1 2 3 DataGrid2 STOPID NAME 1..........Name1 1..........Name2 2..........Name3 2..........Name4 3..........Name5 3..........Name6 Then you click on STOPID 1 and the STOPID == 1 in DataGrid2 would get selected right? Try something like this. http://gist.github.com/581418#file_flex_data_grid_query Set allowMultipleSelection="true" on DataGrid2 and then find the matches in Datagrid2 and make an array of their indices. Then you can set that array to DataGrid2.selectedIndices.
... View more
09-15-2010
12:29 PM
|
0
|
0
|
722
|
|
POST
|
Looking at the docs http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html The returned event is QUERY_FEATURES_COMPLETE. com.esri.ags.events.FeatureLayerEvent.QUERY_FEATURES_COMPLETE http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#event:queryFeaturesComplete I have not used queryFeatures in my apps yet, so I'm not sure if results will be displayed as graphics on screen, but the QUERY_FEATURES_COMPLETE event returns a FeatureSet. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/events/FeatureLayerEvent.html
... View more
09-15-2010
11:53 AM
|
0
|
0
|
850
|
|
POST
|
A FeatureLayer is a subclass of a GraphcisLayer, so you can use GraphicUtil.getGraphicsExtent to do it, after you have done a selection on the FeatureLayer. var ac:ArrayCollection = featureLayer.graphicProvider as ArrayCollection;
map.extent = GraphicUtil.getGraphicsExtent(ac.toArray());
... View more
09-15-2010
10:44 AM
|
0
|
0
|
850
|
|
POST
|
If the two datagrids are in the same widget and you have already called the webservice once to pull all the related data in the second widget, you could use a filter function on the source for the second datagrid that would change based on what is selected in the first datagrid. something likethis pseudocode [Bindable]
protected var mySource:ArrayCollection;
protected var content:String;
<mx:DataGrid id="dg1" itemClick="datagrid1_itemClickHandler(event)"/>
<mx:DataGrid id="dg2" dataProvider="{mySource}" />
// filter
protected function datagrid1_itemClickHandler(event:ListEvent):void {
content = event.currentTarget.selectedItem["fieldname'];
mySource.filterFunction = filterData;
mySource.refresh();
}
// this should work, may have to play with it
protected function filterData(item:Object):Boolean {
var target:String = "fieldname";
var key:String = String(item[target]).toLowerCase();
return key.indexOf(content) != -1;
} This way you don't need to send constant requests to a web service. If I'm understanding you right, this could be one way to go about it.
... View more
09-15-2010
10:39 AM
|
0
|
0
|
722
|
|
POST
|
Using a FeatureLayer the way I think you're intending, you would use the definitionExpression of the FL. Check this example. http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayer_Search Another method, that will work the way you have in your post is to use featureLayer.queryFeatures(), which basically sends its params to a queryTask.execute() inside the Featurelayer.
... View more
09-14-2010
10:33 AM
|
0
|
0
|
246
|
|
POST
|
I was curious if there was a clean way to remove particular selections from a Featurelayer. I tried a couple of different methods to limit the selection to first selected feature. I thought I could cheat and splice the selectedFeatures var x:uint = featurelayer.selectedFeatures.length;
featurelayerselectedFeatures.splice(1,x); But that didn't work. Then I tried to grab the first graphic and make a new FeatureCollection var g:Graphic = featurelayer.selectedFeatures[0];
featureLayer.featureCollection = new FeatureCollection(new FeatureSet( )); That didn't work either. The next step I suppose would be to use the first graphic geometry to do second selection query on the FeatureLayer, but that seems a bit heavy handed. The reason I am using FeatureLayer is that this is for a custom component and it is much simpler to pass a FeatureLayer with built in query/selection capabilities than to pass a QueryTask URL and an existing GraphicsLayer on the Map, plus it fits into my workflow as I have some listeners in the main app for when a selection ends on the FeatureLayer being passed. If there's no way to tweak the SelectedFeatures after the fact, I'll just go the QueryTask/GraphicsLayer route, but I figure it couldn't hurt to ask.
... View more
09-09-2010
07:51 AM
|
0
|
2
|
2082
|
|
POST
|
I think you'll need to listen for the UPDATE_COMPLETE event from the map after turning off the zoom slider.
map.addEventListener(FlexEvent.UPDATE_COMPLETE, onUpdateComplete_handler);
map.zoomSliderVisible = false;
function onUpdateComplete_handler(e:FlexEvent):void {
map.removeEventListener(FlexEvent.UPDATE_COMPLETE, onUpdateComplete_handler);
createPDF();
}
... View more
09-07-2010
12:15 PM
|
0
|
0
|
481
|
|
POST
|
I was using the Yahoo astra one, but I started using this one when I moved to Flex 4 http://flashcommander.org/blog/flex-4-autocomplete It works great for me.
... View more
09-04-2010
09:24 AM
|
0
|
0
|
324
|
|
POST
|
Hi Robert, I just wanted to give you a big thanks. I wanted to make sure it was ok with you that I've added your functions to build the swatches into a function in my flex library in my signature. SwatchFactory I couldn't find an email for you, or I would have just sent one. I put a sample up of how I'm using it in a non-widget capacity. Thanks again.
... View more
09-03-2010
09:09 AM
|
0
|
0
|
959
|
|
POST
|
Recently I noticed in the 2.0 API, there is no more LayerEvent.TILES_UPDATED, just a LayerEvent.UPDATE_END, which is great. Simplifies things quite a bit. When needing to manage Layers, i.e. - when they load and are complete, it would be great if the Flex API could dispatch a LayerEvent.UPDATE_END when layer.visible = false is peformed. I realize that visible is inherited from the UIComponent, but as of right now if you want to know that layer.visible has been set to false, you need to listen for FlexEvent.HIDE, but when layer.visible is set to true, you'll still get a LayerEvent.UPDATE_END event. That would mean that to manage visible layers in real time, I'd need to listen to 2 events from the same layer to do the same thing. Here is a code snippet that I currently use to deal with this situation.
map.addEventListener(MapEvent.LAYER_ADD, map_layerAddHandler)
protected var lyrCount:uint;
protected var lyrUpdateCount:uint;
protected function map_layerAddHandler(event:MapEvent):void {
var lyr:Layer = event.layer;
lyr.addEventListener(LayerEvent.UPDATE_END, onLayerUpdateEnd_handler);
lyr.addEventListener(FlexEvent.HIDE, function(e:Event):void{trace(e)});
lyr.addEventListener(FlexEvent.HIDE, onHide);
if (lyr.visible)
lyrCount++;
}
// I need to listen for the Hide event and manually dispatch a LayerEvent
// in order to have a proper count of current visible layers
protected function onHide(event:FlexEvent):void {
if (event.currentTarget is Layer) {
event.currentTarget.dispatchEvent(new LayerEvent(LayerEvent.UPDATE_END, event.currentTarget as Layer, null, true, false));
}
}
protected function onLayerUpdateEnd_handler(event:LayerEvent):void {
if (event.updateSuccess) {
lyrUpdateCount++;
var lyr:Layer
var tmpCount:uint = lyrCount;
lyrCount = 0;
for each (lyr in this.layers) {
if (lyr.visible)
lyrCount++;
}
trace("lyrCount",lyrCount);
trace("lyrUpdateCount",lyrUpdateCount);
trace("tmpCount",tmpCount);
if (lyrUpdateCount == lyrCount || lyrCount != tmpCount) {
lyrUpdateCount = 0;
}
}
}
It's really more of a convenience request, but it'd be nice to have. I figure since you're working on API 2.1, it couldn't hurt to ask. Thanks.
... View more
09-02-2010
08:34 AM
|
0
|
0
|
2049
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-13-2025 03:13 PM | |
| 2 | 11-06-2025 11:10 AM | |
| 3 | 11-05-2025 02:54 PM | |
| 1 | 11-04-2025 02:38 PM | |
| 1 | 10-27-2025 08:17 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|