|
POST
|
Lefteris, This might have some unforeseen consequences but try this The yourFeatureLayer is the id of your feature layers yourFeatureLayer.removeEventListeners(LayerEvent.UPDATE_END);
yourFeatureLayer.removeEventListeners(LayerEvent.UPDATE_START); Thank you Robert. This function takes two arguments, but anyway I tried it and it doesn't prevent the attribute table from refreshing. Do you know where in the api when you zoom in/out, it updates the attribute table entries? Thanks.
... View more
02-27-2014
12:35 PM
|
0
|
0
|
2162
|
|
POST
|
The attribute table is a tough nut to crack. I created a duplicated attribute table, so when I perform a query it will show only the results of the query. However, when you zoom in/out, the attribute table is updated to include any visible features that are not part of the query. So, my goal is to develop a way to disable the updating process when you zoom in/out and have this duplicate table post only query results. The attributetable has a property called updateEnabled but it didn't work. I think the process that updates the table must be buried in the API. So, I am in the process to create an alternate process that is not very practical. In the init of the attribute table, I set a boonlean variable that is by default to false. If it is false, then it should exit the init and terminate further process. The query process that it is originated from another widget sends a the boonlean variable (widget communication - Thanks Robert) to the attribute table as true and it opens the attribute table with the query results. If you zoom in/out that boonlean variable will be false it will not alter the table. So, here are my two questions. Is there an easier way to disable the updating the table when you zoom in out? If not, how can you exit the widget in runtime? If in the init of the attribute table the boonlean is false, how can it exit the widget.When I use vb.net it was easy to do so, but how it's done in flex? Thank you.
... View more
02-26-2014
06:31 PM
|
0
|
9
|
3319
|
|
POST
|
Lefteris, That line and the line above are leftover form some development/testing. There are times when you can do something similar to this in development and it will have a purpose. Here is an example: import com.esri.ags.layers.FeatureLayer;
FeatureLayer; This forces the compiler to use the import without warning that it is not used. This is sometimes needed in the parent component of another component to prevent a memory leak issue (if you receive a warning about this possible memory leak issue). We can see this in a viewer file called ForcedImports.as I am working on a 3.6.2 release this week, so thanks for letting me know about this. Thank you Robert. I didn't know that you can do that with raising error flags.
... View more
02-20-2014
07:36 AM
|
0
|
0
|
1071
|
|
POST
|
[ATTACH=CONFIG]31600[/ATTACH] After spending quite bit of time, I am still puzzled by a line of code that I saw in the eSearch widget. The line in question is actually located in the SearchWidgetFixedDG.mxml code. I attached a screenshot of it. So, if any of the Flex experts or Robert himself can explain what is the purpose of the line "fl", I'd really appreciate it. Obviously the compiler understands it, since it doesn't raise any error flags. This is very unusual for me to see a variable that is "hanging" by itself. Thank you.
... View more
02-19-2014
07:54 PM
|
0
|
3
|
1464
|
|
POST
|
Lefteris, OK, So all you need to do is once you have the results from your Identify or Query operation than you just need to make a new FeatureLayer or ArcGISDynamicMapServiceLayer for each of the resulting layers. The AttributeTableWidget automatically picks up any FeatureLayer and ArcGISDynamicMapServiceLayer that is added to the map But it will not do anything for a GraphicsLayer as most widgets normally produce. Thank you. Good tip!
... View more
02-18-2014
09:37 AM
|
0
|
0
|
1525
|
|
POST
|
Thank you for your reply. The layer will be hard corded in. So far, I developed the script that a user can right click on any polyline or point and run the buffer tool based on a selected distance. I suppose the next step is to create a loop for all visible layers to run the indentifytask against the buffer polygon and capture the features in the buffer for each layer that lie therein( that I can do). Then, post the findings in the attribute table(that I am trying to figure it out). Ideally, I would also modify the attribute table to offer the option to print in pdf in a custom report layout listing all buffered features in each layer. But I take it a step by step. I will look in the point buffer as you suggested. Thank you. Lefteris, Getting the layer to display in the attributetable is probably the easiest part of your whole desired workflow. Are you planning on hardcoding the layers that will get buffered or just have them defined in a XML configuration file? There is not a widget out there right now that does your exact workflow as you probably know. The Point Buffer Widget might be a good starting point for your development if you are looking at allowing the user to dynamically draw on the map and have that buffered (of course it is only designed for points right now but its a good start). I guess a more detailed workflow would be needed before I can give more direction.
... View more
02-17-2014
06:08 PM
|
0
|
0
|
1525
|
|
POST
|
The Attribute widget displays the the fields of ALL layers that are visible and active. I'm researching a way to use a modified version of this widget, so that when I buffer a polyline or a point, it will capture all the features from all active layers within that buffer and display them on the attirbute table. So, each tab would show the layer with the captured features. I am aware of the eSearch widget; however you have to select only one layer to query. I???d like to buffer for multiple layers. Suggestions? Thank you! The same question will be posted on the Flexviewer forum.
... View more
02-15-2014
12:11 PM
|
0
|
1
|
1026
|
|
POST
|
The Attribute widget displays the the fields of ALL layers that are visible and active. I'm researching a way to use a modified version of this widget, so that when I buffer a polyline or a point, it will capture all the features from all active layers within that buffer and display them on the attirbute table. So, each tab would show the layer with the captured features. I am aware of the eSearch widget; however you have to select only one layer to query. I???d like to buffer for multiple layers. Suggestions? Thank you! The same question will be posted on the Flex API forum.
... View more
02-15-2014
12:09 PM
|
0
|
4
|
4149
|
|
POST
|
Hello Paul. Would you mid sharing the source code in CF? Thanks. we use coldfusion + iText for this server side. we build the attribute tables dynamically, measure their sizes once the tables are filled w/data, then merge them w/the PDF map document produced by the AGS print task, sticking what fits in the map's white space & dumping what doesn't onto supplemental pages. iText gives you an insane amount of control, coldfusion lets us glue this altogether more easily. i suppose anything server side that can talk to java or c# an be used w/iText (it has java & c# versions). we've tried purePDF (partial AS3 port of iText) & alivePDf client side but we found these too slow & lacking some functionality.
... View more
01-07-2014
06:22 PM
|
0
|
0
|
3848
|
|
POST
|
Lefteris, The points geometry might be in WebMercator but the attributes of Lat and Long are in Geographic. So did you test the code I provided? If it worked than you should mark this thread as answered. Don't forget to click the Mark as answer check on this post and to click the top arrow (promote). Follow these steps as shown in the below graphic: Are you sarcastic? I have already checked other answers and I don't need the idiot pictures to show me how to do it. Certainly, responding to questions with capital letters is not welcome either. Thanks for your help but in the future ignore my questions. Let other users who have more patience to answer them. FYI, I found the answer myself before you posted the last answer, after I checked the Flex APi and found the webmercatorpoint.
... View more
10-16-2013
03:36 PM
|
0
|
0
|
2786
|
|
POST
|
Lefteris, OK, the reason I mentioned that I thought you have your lat and Long reversed when you are creating your map points for the poly line is this. A MapPoint takes an X and a Y (in that order). What you have is: pA.push(new MapPoint(obj.lat,obj.long, new SpatialReference(102100))); Which equates to MapPoint(Y, X, new SpatialReference(102100))); Also your attached table shows me that the Lat and Long coordinates are NOT webmercator they are geographic and DO need to be projected. So here is the code that I would be using: private function doQuery():void
{
queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
if (featureSet.features.length == 1)
{
myMap.zoomTo(featureSet.features[0].geometry);
}
else if (featureSet.features.length > 1)
{
var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features);
if (graphicsExtent)
{
myMap.extent = graphicsExtent;
}
var m:int;
var pA:Array = [];
var wmp:WebMercatorMapPoint;
for(m=0; m<featureSet.features.length; m++){
wmp = new WebMercatorMapPoint(featureSet.attributes ["Long"], featureSet.attributes ["Lat"]);
pA.push(wmp);
}
var pLine:Polyline = new Polyline(null, new SpatialReference(102100));
pLine.addPath(pA);
var gra:Graphic=new Graphic(pLine, new SimpleLineSymbol("solid",0xFF3333,1,3), null);
myGraphicsLayer2.add(gra);
}
}
} ok, thanks. The reason I thought that the point are in webmercator is because the source of the point layer indicated that they were in the web mercator coord system. I guess I was wrong.
... View more
10-16-2013
07:09 AM
|
0
|
0
|
2786
|
|
POST
|
Lefteris, Looks like you have you lat and Long reversed when you create your map point. Points are entered in order of lat, long I created a datagrid to show the lat long that it captures and they are correct (see attached). So I don't think its a case of reverse lat long. But I do know that it is something simple. [ATTACH=CONFIG]28355[/ATTACH]
... View more
10-15-2013
08:36 PM
|
0
|
0
|
2786
|
|
POST
|
Lefteris, Based on the field name of Lat and Long, are the coordinates in the point feature Geographic? If so then you need to re-project them to 102100 before you add them to the polyline. Just declaring them as WKID 102100 does not re-project them. No, they are not. The points are in the same coordinate system (Web Mercator) in the point layer as well. I included below the rest of the code in case you spot something. At this point all I get are all the selected points based on the query but the polyline is not drawn. I tried the option to use another graphiclayer as well (not shown below, I removed it) so I can draw the polyline on it, but it didn't work. Thank you for your input. <fx:Declarations> <!-- Layer with US States --> <esri:QueryTask id="queryTask" showBusyCursor="true" url="http://10.112.89.131/dea_arcgis/rest/services/postmile_2012/d2_test/MapServer/0" useAMF="true"/> <esri:Query id="query" outSpatialReference="{myMap.spatialReference}" returnGeometry="true" outFields="[Route,Odometer,Lat,Long]" where = "Route = 3 AND Odometer < 118.955 AND Odometer > 47.717"> </esri:Query> </fx:Declarations> <esri:Map id="myMap"> <esri:extent> <esri:Extent xmin="-13909920" ymin="2928237" xmax="-7354680" ymax="6362400"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </esri:extent> <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <esri:GraphicsLayer id="myGraphicsLayer" graphicProvider="{queryTask.executeLastResult.features}"/> </esri:Map>
... View more
10-15-2013
03:16 PM
|
0
|
0
|
2786
|
|
POST
|
I run a query from a point layer. The intention is to capture the lat long fields of the selected points and draw a polyline connecting the points. The polyline does not appear. Suggestions? Thank you. private function doQuery():void { queryTask.execute(query, new AsyncResponder(onResult, onFault)); function onResult(featureSet:FeatureSet, token:Object = null):void { if (featureSet.features.length == 1) { myMap.zoomTo(featureSet.features[0].geometry); } else if (featureSet.features.length > 1) { var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features); if (graphicsExtent) { myMap.extent = graphicsExtent; } var m:int; var pA:Array; pA=[]; for(m=0; m<featureSet.features.length; m++){ var obj:Object = new Object(); obj.lat= featureSet.attributes ["Lat"]; obj.long=featureSet.attributes ["Long"]; pA.push(new MapPoint(obj.lat,obj.long, new SpatialReference(102100))); } var pLine:Polyline=new Polyline(null,new SpatialReference(102100)); pLine.addPath(pA); var gra:Graphic=new Graphic(pLine); gra.symbol = new SimpleLineSymbol("solid",0xFF3333,1,3); myGraphicsLayer2.add(gra); } }
... View more
10-13-2013
12:27 PM
|
0
|
9
|
4529
|
|
POST
|
This question is for flexviewer. Does anyone has any idea how to change the symbology (line weight, color) over a segment of a single-part line feature using the beginning and ending set of coords? Ultimately, the url parameters would provide the beginning and ending sets of coords and line id. Based on the parameters, the new symboloy will displayed over the requested line segment/ Thanks.
... View more
09-18-2013
11:01 AM
|
0
|
0
|
822
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | 2 weeks ago | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|