POST
|
Are you talking about flex connect to sql server DB? flex cannot directly connect to sql server DB, it need through some web server. I follow the link below, it works: http://www.codeproject.com/Articles/37649/Flex-Communication-with-ASP-NET-WebService Good luck.
... View more
12-18-2014
02:06 AM
|
0
|
1
|
16
|
POST
|
Hello everyone, I have surfed internet for the possibility for the problem for quite a while, but haven't found the related topic. What I want to do is add ContextStripMenu to selected feature(s) only, it should be added to the right -click menu on a feature like the below picture: Is it possible? I am using arcgis api for flex 3.6, thanks a lot.
... View more
12-07-2014
08:57 PM
|
0
|
2
|
2474
|
POST
|
Hello everybody, I have 2 layers in the map (1 polyline layer and 1 polygon layer), and a "select and zoom" function which will select a feature and zoom to it. The strange thing is although I use the same code(except the geometry type), the result is different: - for polygon feature : can select the feature and zoom to it properly. - for polyline feature : only zoom to the feature, but never select the feature. I cannot figure out why this happen, is this because of the layer data or something else? The code I am using is as follows: private function onSelectItem(e:ContextMenuEvent):void{ if(datagrid.selectedIndex >= 0){ this.cursorManager.setBusyCursor(); if (datagrid.selectedItem.shape == "Polyline") { var query:Query = new Query; queryTask.url = "http://localhost:6080/arcgis/rest/services/MyService/MapServer/0"; query.where = "Segment_ID = '" + datagrid.selectedItem.segmentID + "'"; query.outSpatialReference = map.spatialReference; query.returnGeometry=true; queryTask.execute(query, new AsyncResponder(onResult, onFault)); } else if (datagrid.selectedItem.shape == "Polygon") { var queryP:Query = new Query; queryTask.url = "http://localhost:6080/arcgis/rest/services/MyService/MapServer/1"; queryP.where = "Segment_ID = '" + datagrid.selectedItem.segmentID + "'"; queryP.outSpatialReference = map.spatialReference; queryP.returnGeometry=true; queryTask.execute(queryP, new AsyncResponder(onResultPolygon, onFault)); } function onResult(featureSet:FeatureSet, token:Object = null):void { graphicsLayer.clear(); if (featureSet.features.length == 0) { Alert.show("No feature found. Please try again."); } else { var unionExtent:Extent; var myFirstGraphic:Graphic = featureSet.features[0]; unionExtent = Polyline(myFirstGraphic.geometry).extent; myFirstGraphic = new Graphic(); for each (var myGraphic1:Graphic in featureSet.features) { myFirstGraphic.geometry = myGraphic1.geometry; graphicsLayer.add(myGraphic1); if(myGraphic1.geometry !== myFirstGraphic.geometry){ unionExtent = unionExtent.union(Polyline(myGraphic1.geometry).extent); } } map.extent = unionExtent; } } function onResultPolygon(featureSet:FeatureSet, token:Object = null):void { graphicsLayer.clear(); if (featureSet.features.length == 0) { Alert.show("No feature found. Please try again."); } else { var unionExtent:Extent; var myFirstGraphic:Graphic = featureSet.features[0]; unionExtent = Polygon(myFirstGraphic.geometry).extent; myFirstGraphic = new Graphic(); for each (var myGraphic1:Graphic in featureSet.features) { myFirstGraphic.geometry = myGraphic1.geometry; graphicsLayer.add(myGraphic1); if(myGraphic1.geometry !== myFirstGraphic.geometry){ unionExtent = unionExtent.union(Polygon(myGraphic1.geometry).extent); } } map.extent = unionExtent; } } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } } I am using ArcGIS api for flex 3.6, thanks in advance.
... View more
12-07-2014
07:23 PM
|
0
|
0
|
3079
|
POST
|
Hi Robert, I have 2 layers (1 polyline, 1 polygon). I use the same code (except to change polyline to polygon), it works properly (zoom to the feature, also select the feature). Since this thread is too long, I create a new thread to make it clear. thanks.
... View more
12-07-2014
06:59 PM
|
0
|
0
|
54
|
POST
|
Hi Robert, Sorry forgot to mark the answer as correct. I followed your instruction and got the issue solved.
... View more
12-07-2014
06:55 PM
|
0
|
0
|
9
|
POST
|
Hi Robert, Yes myFirstGraphic.geometry is not null and the geometry is polyline. The code seems partially work now, it can zoom to the feature but not select the feature. Is there anything missing? Thanks a lot!!
... View more
12-02-2014
07:10 PM
|
0
|
0
|
54
|
POST
|
Thank you Robert for the help on this topic. But the problem still there. I trace the progress and find the application stuck at this line: unionExtent = Polyline(myFirstGraphic.geometry).extent; And I found the code will NOT satisfy the condition of :(myGraphic1.geometry !== myFirstGraphic.geometry). Thanks!
... View more
12-01-2014
05:50 PM
|
0
|
3
|
54
|
POST
|
Hi Robert, Currently situation is I can confirm the query feature exists. BUT the strange thing is in both cases(the feature exists or not exist), it always show the busy cursor. What may be the possible reason for this problem? Thanks for the help.
... View more
11-27-2014
12:01 AM
|
0
|
5
|
54
|
POST
|
Hi Robert, Yes I trace the query statement and also verified it in arcmap. Thanks.
... View more
11-25-2014
05:09 PM
|
0
|
0
|
54
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|