|
POST
|
Very interesting, was wondering about the same thing. Also wondering for a first release, will all the funcctionalities of the sdk be preserved.
... View more
06-04-2014
12:01 AM
|
0
|
0
|
1069
|
|
POST
|
You will have to load the fields into an array, and then make the data provider of the combo box point to that array.
... View more
05-29-2014
05:36 AM
|
0
|
0
|
353
|
|
POST
|
Hi Aaron, Many thanks for your reply, very appreciated 🙂 It worked great as you said. Regards; Raffu
... View more
05-24-2014
05:57 AM
|
0
|
0
|
206
|
|
POST
|
Hello guys, thanks for the replies. Robert: I did check the filed name, no changes that I observed, The weird thing is that almost half the time, no errors are generated and everything goes smoothly, all fields are returned, nothing is blank or null, and half the other time, all hell breaks loose. What is weirder is it doesn't seem random, meaning everything would work for hours at a time, then not work for more hours at a time. Driving me nuts. For example, right now, everything is working great, usually things start to freak out after around 5 PM EGY time, am sure this observation doesn't make any sense, but it is what is happening in the last few days. Raymond: Unfortunately I don't have direct access to the servers, so it might be challenging to get the error logs.
... View more
05-22-2014
04:02 AM
|
0
|
0
|
616
|
|
POST
|
Hi all; Since the servers were updated to 10.2.2, all the queries freaked out...so anyways I read the docs on ESRI's help page about the changes required, for SQL injection prevention and things like that. So in my code, I really dont think I have any software specific codes in relation to the queries. Anyway I have a bunch of points, and each has relationship with other tables and features, this is for landmark types, media, address...etc. So I was getting the 2023 error initially when the queries were being called, I explicitly made the queries to use GET instead of POST and useAMF is false. The errors still are there, sometimes they show up, other times they dont. [RPC Fault faultString="Error performing query related records operation" faultCode="500" faultDetail=""] You can see the beta app here: http://www.digitaleg.com/Digital_Egypt/EGIPA/Map_En.html This is strange because the points are loaded initially based on a relationship query, but no errors, but the error is generated when further relationship queries are sent. Here is a block of the relevant code, trimmed as much as possible:
//This function sometimes works and sometimes doesnt. But the points always load. It is the popup error that sometimes shows and sometimes doesnt.
private function doQueryLandmarkMensHair(event:Event) : void
{ landmarkTypeQueryTask = null;
landmarkTypeQueryTask = new QueryTask;
landmarkTypeQueryTask.useAMF = false;
var landmarksRelationshipQuery:RelationshipQuery = new RelationshipQuery();
landmarksRelationshipQuery.objectIds = [182];
landmarksRelationshipQuery.relationshipId = 3;
landmarksRelationshipQuery.returnGeometry = true;
landmarksRelationshipQuery.outSpatialReference = myMap.spatialReference;
landmarkTypeQueryTask.method = URLRequestMethod.GET;
landmarkTypeQueryTask.url = "url here";
landmarkTypeQueryTask.executeRelationshipQuery(landmarksRelationshipQuery, new AsyncResponder(onLandmarksMensHairResult, onRelationshiptQueryFault, null));
}
//This function sometimes works and sometimes doesnt. But the points always load. It is the popup error that sometimes shows and sometimes doesnt.
private function onLandmarksMensHairResult( result:Object, token:Object = null ) : void
{
landmarkResultsCount = result[182].features.length;
landmarksGraphicsLayer.clear();
for each (myLandmarksGraphic in result[182].features)
{
selectedLandmarkObjectID = myLandmarksGraphic.attributes.OBJECTID;
landmarksGraphicsLayer.add(myLandmarksGraphic);
landmarksADGVar.landmarksADG.dataProvider = result[182].attributes;
}
}
<esri:GraphicsLayer id="landmarksGraphicsLayer" click="landmarksClickHandler(event);"/>
//The below function is when the error is generated from one of the relationship queries
�?? private function launchLandmarkDetails():void
{
landmarkInfoQuery.relationshipId = 5;
landmarkInfoQuery.outFields = ["*"];
landmarkInfoQuery.returnGeometry = true;
landmarkInfoQuery.outSpatialReference = myMap.spatialReference;
landmarkPanoramaQuery.relationshipId = 0;
landmarkPanoramaQuery.outFields = ["MediaEName" , "L5" , "L2"];
landmarkPanoramaQuery.returnGeometry = true;
landmarkPanoramaQuery.outSpatialReference = myMap.spatialReference;
landmarkPanoramaQuery.definitionExpression = "MediaType = 2";
landmarkPicturesQuery.relationshipId = 2;
landmarkPicturesQuery.outFields = ["MediaEName" , "L4" , "L1"];
landmarkPicturesQuery.returnGeometry = true;
landmarkPicturesQuery.outSpatialReference = myMap.spatialReference;
landmarkPicturesQuery.definitionExpression = "MediaType = 1";
queryTaskLandmarkPanorama.method = URLRequestMethod.GET;
queryTaskLandmarkPanorama.useAMF = false;
queryTaskLandmarkPanorama.url = "url";
queryTaskLandmarkPanorama.executeRelationshipQuery(landmarkPanoramaQuery, new AsyncResponder(landmarkRVResult, onRelationshiptQueryFault, null));
queryTaskLandmarkInfo.method = URLRequestMethod.GET;
queryTaskLandmarkInfo.useAMF = false;
queryTaskLandmarkInfo.url = "url";
queryTaskLandmarkInfo.executeRelationshipQuery(landmarkInfoQuery, new AsyncResponder(landmarkInfoResult, onRelationshiptQueryFault, null));
queryTaskLandmarkPictures.method = URLRequestMethod.GET;
queryTaskLandmarkPictures.useAMF = false;
queryTaskLandmarkPictures.url = "url";
queryTaskLandmarkPictures.executeRelationshipQuery(landmarkPicturesQuery, new AsyncResponder(landmarkPicturesResult, onRelationshiptQueryFault, null));
function landmarkInfoResult(landmarkInfoResultVar:Object, infoToken:Object = null):void
{
//do some stuff, read the data
}
function landmarkRVResult(landmarkPanoramaResultVar:Object, mediaToken:Object = null):void
{
//do some stuff, read the data
}
function landmarkPicturesResult(landmarkPicturesResultVar:Object, mediaToken:Object = null):void
{
//do some stuff, read the data
}
} Any ideas guys?
... View more
05-21-2014
02:25 PM
|
0
|
4
|
1045
|
|
POST
|
Greetings! To add to this thread, I am using a direct feed from a vehicle modem and just needed to use the coordinates or a MapPoint to create driving directions. Instead of using the searchTerm of the stopProvider for the coordinates, I set the location property of the stopProvider and use the searchTerm as a descriptor. This works very well.
// create directions from the mobile vehicles current location to the selected call.
var fromVehicle:DirectionsStop = drivingDirections.stopProvider[0];
fromVehicle.editable = false;
var vehPT:MapPoint = vehGraphic.geometry as MapPoint;
fromVehicle.location = vehPT;
fromVehicle.searchTerm = "My Current Vehicle Location...";
// now get the call point
var call:Call = ItemRenderer(event.target).data as Call;
var toLocation:DirectionsStop = drivingDirections.stopProvider[1];
toLocation.editable = false;
toLocation.searchTerm = call.address;
toLocation.location = call.geometry;
drivingDirections.getDirections();
This is great, thanks Tom
... View more
05-21-2014
01:10 PM
|
0
|
0
|
272
|
|
POST
|
Posting your code may get your more replies by the way.
... View more
05-21-2014
01:05 PM
|
0
|
0
|
323
|
|
POST
|
Hello Aaron; Thanks for the replies above, I just have a question related to this so I hope it is ok to post it here. I am basically trying to sniff all the initial matches returned and dd graphic points on the map, one for each match. My for loop is throwing an error: index is out of bounds What I am able to do however is get the selected result and then bring back all the details by getting the object id of the result and then firing a query, not necessarily faster than an identify, it is just what I came up with. So here is my code and any help is highly appreciated: <esri:Geocoder autoComplete="true" url="url here" id="geoCoderID" map="{myMap}"/>
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
geoLO.searchExtent = myMap.extent;
geoCoderID.locatorOptions = geoLO;
geoCoderID.locatorOptions.outFields = [ "Loc_name" , "Ref_ID" ];
geoCoderID.addEventListener(GeocoderEvent.RESULT_SELECTED,geocoderResultSelected);
geoCoderID.addEventListener(GeocoderEvent.SEARCH_AUTO_COMPLETE,geocoderSearchAutoCompleteEventHandler);
geoCoderID.addEventListener(GeocoderEvent.SEARCH_COMPLETE, geocoderResultsEvent);
}
private function geocoderSearchAutoCompleteEventHandler(event:GeocoderEvent):void
{
var geocoderResultsGraphic:Graphic = new Graphic();
geocoderResultsGraphic.id = "graphicResults";
geocoderResultsGraphic.symbol = geocoderResultSymbol;
for(var i:int = 1; i<event.results.length; i++)
{
geocoderResultsGraphic.geometry = event.results[0].geometry;
geocoderResultsGraphic.toolTip = event.results[0].label.toString();
myMap.defaultGraphicsLayer.add(geocoderResultsGraphic);
}
}
//The below function works as intended
private function geocoderResultSelected(event:GeocoderEvent):void
{
landmarkPointX = event.result.data.location.x;
landmarkPointY = event.result.data.location.y;
landmarkMapPoint = new MapPoint(landmarkPointX,landmarkPointY,null);
identifyMapPoint = new MapPoint(landmarkPointX,landmarkPointY,null);
myMap.defaultGraphicsLayer.clear();
if(event.result.data.attributes.Loc_name == "LandmarkCom.ELandmarkAll" ||
event.result.data.attributes.Loc_name == "LandmarkCom.ELandmarkName")
{
queryLandmarks.where = "OBJECTID="+ event.result.data.attributes.Ref_ID;
queryTaskLandmarks.execute(queryLandmarks, new AsyncResponder(catchLandmarkGeocoderDetails, onURLLoadFault ));
}
else if(event.result.data.attributes.Loc_name == "BuildingCom.EBuildingAll"
|| event.result.data.attributes.Loc_name == "BuildingCom.EBuildingArea"
|| event.result.data.attributes.Loc_name == "BuildingCom.EBuildingNumber")
{
queryBuildingURL.where = "OBJECTID="+ event.result.data.attributes.Ref_ID;
queryTaskBuildingURL.execute(queryBuildingURL, new AsyncResponder( onBuildingURLResults, onURLLoadFault ));
}
else if(event.result.data.attributes.Loc_name == "StreetCom.EStreetAll" || event.result.data.attributes.Loc_name == "StreetCom.EStreetName")
{
queryStreetURL.where = "OBJECTID="+ event.result.data.attributes.Ref_ID;
queryTaskStreetURL.execute(queryStreetURL, new AsyncResponder( onStreetURLResults, onURLLoadFault ));
}
geoCoderID.clearButton.addEventListener(MouseEvent.CLICK,clearGeocoderGraphic);
myMap.scale = 5000;
var geocoderGraphic:Graphic = new Graphic();
geocoderGraphic.geometry = event.result.geometry;
geocoderGraphic.symbol = geocoderResultSymbol;
geocoderGraphic.toolTip = event.result.label.toString();
geocoderGraphic.id = "graphic";
myMap.defaultGraphicsLayer.add(geocoderGraphic);
}
... View more
05-21-2014
12:56 PM
|
0
|
0
|
1311
|
|
POST
|
Raffi, For issues related specifically to the underlying geocoding service, you might want to ask at the Geocoding forum - http://forums.arcgis.com/forums/94-Geocoding Thanks Bjorn; I will do that. If you have time, can you take a stab at number 1 or 2?
... View more
03-03-2014
03:38 PM
|
0
|
0
|
500
|
|
POST
|
Raffi, OK it is just a simple issue of proper case. You need to capatalize the n in Name. In the code you pasted for the AdvancedDataGrid your itemClick was missing the ending double qoute and had a unnecessary semicolon. <mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true" itemClick="zoomStreets()">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEName"/>
</mx:columns>
</mx:AdvancedDataGrid> Oh man, this is absolutely great, I feel 100 Lbs lighter, thank you very much Robert!!
... View more
03-03-2014
02:44 PM
|
0
|
0
|
659
|
|
POST
|
Raffi, I don't see where you are specifing the outfields of the Query... Yes Robert, forgot to paste it: <esri:QueryTask id="queryTaskStreets" url="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/8"/> <esri:Query id="queryStreets" outFields='["StreetEname", "ProjectName"]' returnGeometry="true"/>
... View more
03-03-2014
01:29 PM
|
0
|
0
|
659
|
|
POST
|
Hi all; this is driving me nuts for three days, am sure I am not able to do it, but here it is. Am querying all the streets in a particular area and loading all the results into an ADG. The results are all loaded, and clicking on a row zooms the map to the result BUT somehow the ADG is blank. You can see this in the app http://www.digitaleg.com/Digital_Egypt/El-Rehab/GIS/RehabEnglish.html click on the "Streets List" and you will get a blank ADG but you will see the scroll bars try clicking on an empty row. You can go back to the home screen by clicking the Home icon on the top right bar. This was working before just fine, somehow it is doing this issue now. I even rolled back the API to 3.3 as it was originally to no avail. Here is my code: <mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true" itemClick="zoomStreets(); > <mx:columns> <mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEname"/> </mx:columns> </mx:AdvancedDataGrid> private function launchStreetsHomeQuery():void { queryStreets.where = "StreetEname Is NOT NULL And ProjectName = 1"; queryTaskStreets.execute(queryStreets, new AsyncResponder( zoomStreetsResults, onStreetsFault )); } private function zoomStreetsResults(featureSet : FeatureSet, token : Object = null ):void { var streetsArrCol:ArrayCollection = new ArrayCollection(featureSet.attributes); removeDulicateEntities(streetsArrCol); streetADG.dataProvider = streetsArrCol; } private function zoomStreets():void { myGraphicsLayer.clear(); for (var i : Number = 0; i < queryTaskStreets.executeLastResult.features.length; i++) { if(i==streetADG.selectedIndex) { var graphic : com.esri.ags.Graphic; graphic = queryTaskStreets.executeLastResult.features as com.esri.ags.Graphic; myGraphicsLayer.symbol = slsIdentify; myGraphicsLayer.add(graphic); switch (graphic.geometry.type) { case com.esri.ags.geometry.Geometry.POLYLINE: myMap.extent = Polyline(queryTaskStreets.executeLastResult.features.geometry).extent; break; } } } }
... View more
03-03-2014
12:59 PM
|
0
|
4
|
958
|
|
POST
|
Maybe your service has changed since you posted, but neither "339 Raed Tayar Hassan" nor "339 Raed Tayar Hassan Ahmed" returns any results when I try directly on the REST page - http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/AllInOne/GeocodeServer/findAddressCandidates Thanks BJorn for the reply. Yeah somehow it is not recognizing that address anymore even though we didn't republish the service. You can try it with this on the REST page in the singleLine field 1. 54 kamal el din (no results) 2. 54 kamal el din sameh (brings the intended result) The geocoder also in flex acts weirdly sometimes and the auto search doesn't get triggered automatically.
... View more
03-03-2014
12:19 PM
|
0
|
0
|
500
|
|
POST
|
Raffi, Developing app is painfully slow for me as I am just leaning. but the one thing I can say is that if you are working with a lot of graphics the JS API is much quicker and better at handling 1000s of graphics. One of the real hard things for me so far has been my lack of enough knowledge to put together a dojo dialog widget that has an item renderer (or the JS equivalent). But I plan on spending some time with the JS API developers as the Dev Summit and get that part under my belt hopefully. I plan on continuing my Flex Development for a long time yet. What I have been trying do do in my spare time is taking smaller Flex API apps and attempting to duplicate all the functionality in a JS app. Thanks Robert; The handling of loads of graphics was very important as FB really slowed with over 200 points or more. I totally understand ESRI's decision here, it was coming and I think the first clue was iOS's lack of support for flash. Maybe just the timing could have been better by either making this announcement with the release of the 3.0 API or make the announcement now as they did but pull the plug with the last release of a 4.x API.
... View more
02-25-2014
03:34 PM
|
0
|
0
|
1026
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-15-2012 07:49 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|