|
POST
|
Carmen, Migrating a 1.3 SFV app to 2.0 is possible but absolutely a nightmare. YES - For FlexViewer 1.3 - just load into FlashBuilder 4 but use 1.3 api and 3.5 SDK YES - For other plain Flex apps: load into FlashBuilder 4, but convert them to 2.0 API and 4.0SDK? Migrating a non-SFV app to the 2.0 API and FlashBuilder 4 is not very hard.
... View more
08-24-2010
03:45 PM
|
0
|
0
|
2047
|
|
POST
|
Frank, If you are using the Flex 4.1 SDK than this is a known issue that the API team is working on. For now just use the 4.0 SDK.
... View more
08-23-2010
02:58 PM
|
0
|
0
|
603
|
|
POST
|
Dasa, Ok, so maybe you can help me with my issue then when I query a parcel that has a Sales_Date field of type esriFieldTypeDate it has a value of 11/25/1998 and when it is returned in JSON it is 911952000000. so when I use new Date(value) I get 11/24/1998 instead??? What gives, didn't you just say that developers can simply use new date?
... View more
08-22-2010
06:55 PM
|
0
|
0
|
1399
|
|
POST
|
Dasa, Ok, so why is it not decoded by the API as it is when you query using the service page and have the format equal to html?
... View more
08-22-2010
06:29 PM
|
0
|
0
|
1399
|
|
POST
|
Sangeetha. You are going to have to be more specific as to what you are trying to do. I can not think of anything on my site that has to do with measuring polygons length.
... View more
08-22-2010
11:55 AM
|
0
|
0
|
4149
|
|
POST
|
Don, I am not sure why the api team has not shared a sample for this yet, so I created one.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Query with Domain Values Returned" currentState="test">
<!--
This sample shows how to query the server and displaying
the result in a datagrid with domain values returned or not.
This sample sets up a QueryTask (what layer on what server to query).
When the user clicks the "Search" button, a Query is sent.
The results are displayed in the DataGrid and if the option for
"results with domain values" is chosen than the featurelayers'
layerDetails fields is used to retrieve the value of the domain.
-->
<fx:Declarations>
<s:RadioButtonGroup id="qGroup"/>
</fx:Declarations>
<s:layout>
<s:VerticalLayout gap="0" horizontalAlign="center"/>
</s:layout>
<fx:Script>
<![CDATA[
import com.esri.ags.FeatureSet;
import com.esri.ags.Graphic;
import com.esri.ags.layers.supportClasses.CodedValue;
import com.esri.ags.layers.supportClasses.CodedValueDomain;
import com.esri.ags.layers.supportClasses.Domain;
import com.esri.ags.layers.supportClasses.LayerDetails;
import com.esri.ags.layers.supportClasses.RangeDomain;
import com.esri.ags.tasks.QueryTask;
import com.esri.ags.tasks.supportClasses.Query;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.AsyncResponder;
import mx.utils.ObjectUtil;
private function getDomainValue(fieldName:String,code:String):String
{
var returnValue:String = "";
var fld:Object;
var cVal:CodedValue;
var cDomain:CodedValueDomain;
for each (fld in fLayer.layerDetails.fields)
{
if(fld.name == fieldName){
cDomain = fld.domain;
if (cDomain){
for each (cVal in cDomain.codedValues)
{
if(cVal.code == code)
returnValue = cVal.name;
}
}
}
}
return returnValue;
}
protected function doQuery():void
{
myMap.cursorManager.setBusyCursor();
var queryTask:QueryTask = new QueryTask("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0");
queryTask.useAMF = true;
var query:Query = new Query();
query.where = "status > 1";
query.outFields = ["*"];
query.returnGeometry = true;
query.outSpatialReference = myMap.spatialReference;
queryTask.execute(query, new AsyncResponder(onResult, onFault));
// on result
function onResult(featureSet:FeatureSet, token:Object = null):void
{
try
{
var qResults:Array = [];
for each (var myGraphic:Graphic in featureSet.features)
{
var qObj:Object = new Object();
var obj:Object = myGraphic.attributes;
var fld:String;
var value:String;
for (fld in obj)
{
try{
value = obj[fld].toString();
} catch (error: Error){
value = "";
}
if (fld.toUpperCase().indexOf("SHAPE") < 0)
{
if(qGroup.selectedValue == "Results with domain values"){
var cval:String = getDomainValue(fld,value);
if (cval != "")
value = cval;
}
qObj[fld] = value;
}
}
qResults.push(qObj);
}
resultsGrid.dataProvider = qResults;
myMap.cursorManager.removeBusyCursor();
}
catch (error:Error)
{
Alert.show(error.message);
}
}
//on fault
function onFault(info:Object, token:Object = null) : void
{
Alert.show(info.toString());
}
}
]]>
</fx:Script>
<s:controlBarLayout>
<s:HorizontalLayout horizontalAlign="center"
verticalAlign="middle"
paddingBottom="7"
paddingTop="7"/>
</s:controlBarLayout>
<s:controlBarContent>
<s:RadioButton groupName="qGroup" label="Results with domain values"/>
<s:RadioButton groupName="qGroup" label="Results with out domain values (Normal Results)" selected="true"/>
<s:Button click="doQuery()" label="Search"/>
</s:controlBarContent>
<esri:Map id="myMap">
<esri:extent>
<esri:Extent xmin="-14181000" ymin="4306000" xmax="-12917000" ymax="4767000">
<esri:SpatialReference wkid="102100"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:FeatureLayer id="fLayer" mode="onDemand" outFields="*" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0"/>
</esri:Map>
<mx:DataGrid id="resultsGrid" width="100%">
<mx:columns>
<mx:DataGridColumn dataField="req_id" headerText="Request Id"/>
<mx:DataGridColumn dataField="req_type" headerText="Request Type"/>
<mx:DataGridColumn dataField="req_date" headerText="Request Date"/>
<mx:DataGridColumn dataField="req_time" headerText="Request Time"/>
<mx:DataGridColumn dataField="address" headerText="Address"/>
<mx:DataGridColumn dataField="district" headerText="District"/>
<mx:DataGridColumn dataField="status" headerText="Status, Domain"/>
</mx:columns>
</mx:DataGrid>
</s:Application>
... View more
08-21-2010
05:08 PM
|
0
|
0
|
6253
|
|
POST
|
I have just noticed that queries using AMF set to true are returning date fields in UTC seconds and not an actual date object or date string in the API is this a bug?
... View more
08-20-2010
09:43 PM
|
0
|
6
|
1877
|
|
POST
|
Wes, The Query.text Shorthand for a literal search text on the display field, equivalent to: where YourDisplayField like '%SearchText%'. The Query.where is what you want to use if you want to specify a different kind of SQL query. for querying stand alone tables you need to look at Feature Layer The feature layer can be used to display features from one layer (or non-spatial table) of a Feature Service or a Map Service. If the underlaying layer (or table) is from a Feature Service , it can be used to edit features and apply those edits back to the server. See documentation. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html
... View more
08-20-2010
08:06 PM
|
0
|
0
|
875
|
|
POST
|
vjones, Well you can do it that way you would probably just need to ensure that the polygon graphic does not have an outline specified in the symbology. You would be better served by removing this action from the client and just merge the polygons in ArcMap and serve up a new layer in a map service that has this don already, if the data is not dynamic.
... View more
08-20-2010
03:37 PM
|
0
|
0
|
389
|
|
POST
|
Eric, Yes you can use FlashBuilder 4 with the SFV 1.3 as long as you do as you mentioned and use the 3.x SDK and the 1.3 AGS API. As far as where to drop the output, there seems to be a little confusion there on your side. What you need to do in Import the whole SFV 1.3 source files as a project into your FlashBuilder 4 development environment. Then as you build the project and debug it the compiled swfs will be in the bin-debug folder of your project and when you are happy with your development then you export a release build and then the compiled swfs are in your bin-release folder and are ready to be copied to your web server.
... View more
08-20-2010
11:41 AM
|
0
|
0
|
2047
|
|
POST
|
Brian, Yes it is possible. Can't recall the gotcha's right now though. But I don't remember than to be major issues.
... View more
08-20-2010
11:35 AM
|
0
|
0
|
820
|
|
POST
|
vjones, Seems like that was discussed with Mansour and there was not a good way to do it. (Mansour is one of the main core developers of the AGS Flex API).
... View more
08-20-2010
11:32 AM
|
0
|
0
|
1753
|
|
POST
|
eeharrison, Well about 99.8% of all the widgets in the code gallery are developed for the 1.x version of the flex viewer (aka SFV). You can not use any of the 1.x widgets in the new FlexViewer 2.0... The whole base that the 1.x widgets were built for is different (i.e AGS Flex 1.x API and Flex 3.x SDK). I would say that the widgetdevelopers (like myself) are going to wait until the FlexViewer 2.0 is no longer beta before they start re-developing widgets.
... View more
08-20-2010
11:25 AM
|
0
|
0
|
2047
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|