POST
|
Thanks Dasa, This is great. I was needing this for my selection widget. Chris, A few things to consider. Sorting of the fields is not available when using a labelFunction without the datafield. To fix this you can add a custom sortComapre function. If you have lots of fields you would have to create labelFunctions and sortCompare functions for each field, so creating a more reusable solution would be a better approach. Here is my reusable approach. Feel free to use it. private function labelOf(fullfieldname:String):Function
{
return function (item:Object, column:DataGridColumn):String
{
return item[fullfieldname];
};
}
private function sortOf(fullfieldname:String):Function
{
return function (obj1:Object, obj2:Object):int
{
if(obj1[fullfieldname] < obj2[fullfieldname])
{
return -1;
}
else if(obj1[fullfieldname] > obj2[fullfieldname])
{
return 1;
}
else
{
return 0;
}
};
}
<mx:DataGridColumn headerText="Roll Number"
labelFunction="{labelOf('Parcels.ARN')}" sortCompareFunction="{sortOf('Parcels.ARN')}"/>
<mx:DataGridColumn headerText="Name" wordWrap="true"
labelFunction="{labelOf('LinkedTable.dbo.ASYST_NamesTable_PrimaryOnly.FullName')"}
sortCompareFunction="{sortOf('LinkedTable.dbo.ASYST_NamesTable_PrimaryOnly.FullName')}"/>
... View more
04-28-2011
05:48 PM
|
0
|
0
|
399
|
POST
|
To Mark Hoyland, et. al., Google Analytics fails to report a great deal of the traffic on my Flex Viewer site. David, I cant really answer that as I just use the tools provided by Google. I think these are questions that you would need to ask Google Analytics support or a Google Analytics forum. Here is a link to the Google Analytics support page, There is a forum on that page as well. http://www.google.com/analytics/support.html You could try the AS3 Google Analytics code and monitor the tracking. If you are still not getting the result you need then you might have to look at a commercial product to track your site usage (i do not know what is available).
... View more
04-13-2011
12:18 PM
|
0
|
0
|
509
|
POST
|
The link shows how it can be done in FlexViewer 2.2 by a configurable widget. Not sure about ArcGIS Viewer for Flex V1.3, but it might give you some ideas. http://forums.arcgis.com/threads/26526-open-a-widget-with-keyboard-shortcut?p=88389&viewfull=1#post88389
... View more
04-07-2011
12:18 PM
|
0
|
0
|
422
|
POST
|
Hi there,I just put together a widget for google anaytics. This may be of interest to you. http://forums.arcgis.com/threads/27724-GoogleAnalyticsWidget-for-FlexViewer-2.2
... View more
04-07-2011
06:22 AM
|
0
|
0
|
509
|
POST
|
Mark, Thanks for your response. Unfortunately I didn't have this thread set to email notification so I am just seeing this now! I am aware of the ArcGIS Server setting which controls the number of features returned, however I don't think this is the culprit in my case. While my number of unique values does exceed that default limit, I am only getting ~50 unique values pulled into the selection tool. Let me know if you have an idea on what else might be going on. Thanks! Lisa, Here is a test application to help see if the results are what they should be. You can add your own url and field name at run time. Firstly it will select all features in the layer. If the ArcGISServer limit is reached it will return that amount of features. (standard flex api querytask) Next it the passes the results of the query to a function which extracts the unique values. There is a .swf file included, just double click the .swf in windows explorer and open in internet explorer. Source code is also included if you want to see how it works. Let me know if this helps.
... View more
03-31-2011
03:36 PM
|
0
|
0
|
526
|
POST
|
Thanks Robert i have another question! is it possible to change the code for use the ALIAS of fields in the XML file? Franceso, While it is possible, there is quite a bit of work to get this done. I am not looking at this option yet, but maybe in a version 2 of the widget.
... View more
03-31-2011
01:34 PM
|
0
|
0
|
420
|
POST
|
mmartin;89662 wrote: Thanks for replying Mark. I am not getting any at all. Mike, I could do some testing on your layer. When I query it gives an error message: {
"error" :
{
"code" : 500,
"message" : "No display field",
"details" : []
}
} You will have to set the display field. I think the display field is set in ArcMap under the display tab or the label tab. I also tested another layer of yours (Significant Withdrawal Wells ID: 0) and found that I had to change the query method before it would work. In SelectionByAttributes.mxml the function retreiveFieldValues, I had to comment out the query.where"1=1" and add a new line of query.text = "%". Not sure why text worked and 1=1 did not work on your layer, as both methods are doing the same thing. If you can access the source code, I would suggest making the change. //query.where = "1=1";
query.text = "%";
... View more
03-30-2011
04:37 PM
|
0
|
0
|
420
|
POST
|
Hi Mark but is it possible to extend the widget's function for a map service with a relationshio class? Francesco, I have not done anything with relationship class, so I dont know the answer to that.
... View more
03-30-2011
03:25 PM
|
0
|
0
|
420
|
POST
|
I do have a problem with the Get Unique Values not loading Mike, Do you mean you are not getting a full list or none at all. If you are not getting a full list then it has been mentioned previously in this thread Lisa, List not showing all unique values is to do with an ArcGIS Server setting which controls the amount of features allowed to be returned. The setting can be changed in the server. See the comments on the page where you can download the Selection widget as there is an answer in one of the comments. If you are not getting any values at all, please post your selectionwidget.xml file.
... View more
03-29-2011
07:02 PM
|
0
|
0
|
420
|
POST
|
Jesse, What you want is possible, You would have to redesign the Graphic Interface a bit. The selection statement that you need is: "select * from <layer> where <fld1> = "selection1" OR <fld1> = "selection2" Notice you have to include the field name for each selection. Another possible query is: where <fld1> in ("selection1" ,"selection2") I am not able to test at the moment but it might get you started.
... View more
03-28-2011
04:41 AM
|
0
|
0
|
791
|
POST
|
francesco, Are you able to copy and paste that message, and post it here? Otherwise I need you scroll across the message window, and grab another picture, so I can see the right hand side of the message. It is probably the second and third line of that message that I need to see. ps. By publicly available(previous post), I mean can I put your mapservice into my project, or is it only available within your intranet.
... View more
03-28-2011
04:33 AM
|
0
|
0
|
791
|
POST
|
Xander, I think you have to look into styling. I dont apply any styling so it just uses the default FlexViewer style. http://help.arcgis.com/en/webapps/flexviewer/help/Default.htm#CSHID=styling.htm|StartTopic=styling.htm If you are still unsure post a new thread about styling a datagrid in flex viewer, and I am sure others would be able to help.
... View more
03-27-2011
04:26 PM
|
0
|
0
|
791
|
POST
|
francesco, Is your data available to the public? Is this a text field that has a value of YES/NO ? If you can run the code from within flashbuilder can you post the full error message or the line that the error occurs on.
... View more
03-24-2011
05:53 PM
|
0
|
0
|
551
|
POST
|
Lisa, List not showing all unique values is to do with an ArcGIS Server setting which controls the amount of features allowed to be returned. The setting can be changed in the server. See the comments on the page where you can download the Selection widget as there is an answer in one of the comments. I am also currently investigating the paging method to retreive the result as this will get all results regardless of the setting. (One of the esri samples uses paging.) As for the scale issue,the results are returned to a flex featurelayer, which is similar to a graphicslayer, but the featurelayer is based on the actual layer in the msd/mxd. The scale dependant setting is inherited from the mxd/msd. There is a minscale, maxscale property that can be set for the featurelayer, so yes what you want can be done. If you want to add this yourself for all layers you can add the two lines in bold below to the init() function in SelectionWidget.MXML. I will however add this functionality as a configurable option when I get a chance to update the source code. for (var i:int = 0; i < lyrList.length(); i++)
{
var lyrURL:String = lyrList.url;
var lyrLabel:String = lyrList.name;
var featureLayer:FeatureLayer = new FeatureLayer(lyrURL);
featureLayer.name = lyrLabel;
featureLayer.minScale = 0;
featureLayer.maxScale = 0;
featureLayer.addEventListener(LayerEvent.LOAD, featureLayer_loadHandler);
}
... View more
03-24-2011
05:43 PM
|
0
|
0
|
551
|
POST
|
Billy, What was your issue with the fields and lists? As for the infowindow not closing, here is the fix: Add the following to the end of the featureLayer_selectionHandler function in SelectionWidget.mxml. if (event.type == FeatureLayerEvent.SELECTION_CLEAR)
{
this.showInfoWindow(null);
} I have seen your question in the other thread and I have got no idea on this one. Basically what the widget dose is adds a feature layer to the map, and then selects features from it. What projection is your base map and what projection is your featurelayer? (from the selectionwidget.xml) I will see if I can set up a service with a large point layer and try to replicate the issue. I will try to sort through the issues when I can, as I tinker with these widgets in my spare time for my own personal enjoyment (sad but true!).
... View more
03-24-2011
05:28 PM
|
0
|
0
|
283
|
Title | Kudos | Posted |
---|---|---|
1 | 11-02-2016 07:09 PM | |
3 | 11-03-2016 02:53 PM | |
1 | 10-12-2016 08:12 PM | |
1 | 10-27-2016 02:37 PM | |
1 | 10-12-2016 09:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|