POST
|
Hi all, Is there a simple way to remove just the close button [ATTACH=CONFIG]23211[/ATTACH] that appears in all the widgets. I just want to remove it from a single widget, and is there a simple method instead of creating a new custom widget template? Thank you.
... View more
04-04-2013
10:05 AM
|
0
|
1
|
710
|
POST
|
Hi all, I am using the editor tool to draw line in th application. However, when I draw the lines it appears to be really thick. The service I published for this has the size configured to be 1 pt, however ArcGIS 10.1 somehow defaults it to 6 pt for some reason. As a reson I was thinking to change the size of the graphics symbol when feature template is selected....however I am not able to get hold of the symbol size nor override it. In the Editor widget we have case (Geometry.POLYLINE): { //var drawLineSymbol:Symbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0, 1, 1); //var drawLineSymbol:Symbol = new SimpleLineSymbol(); if (event.selectedTemplate.featureLayer.renderer != null) { drawTool.lineSymbol = event.selectedTemplate.featureLayer.renderer.getSymbol(event.selectedTemplate.featureTemplate.prototype); } else if (event.selectedTemplate.featureLayer.symbol) { drawTool.lineSymbol = event.selectedTemplate.featureLayer.symbol; } drawTool.activate(DrawTool.POLYLINE); break; } I was trying to get hold of drawTool.lineSymbol's width property like drawTool.lineSymbol.width . However I cannot get it. Is there any other way to do this. Thanks.
... View more
12-05-2012
05:57 AM
|
0
|
2
|
687
|
POST
|
Hi all, I have created a Line feature class and added it to the Map Document. Going to its layer properties I then changed the size of the line to be 1 pt. However when I publish the service it defaults to 6 pts and thus I get a really thick line in the web interface where I am calling the service. Does anyone have any idea as what is going on or anything I am missing here. Thanks.
... View more
12-05-2012
05:50 AM
|
0
|
1
|
669
|
POST
|
Hi all, In the native Edit widget when we select the checkbox on/off the same is reflected to the corresponding feature service layer in the LAyer List Widget. How can I connect the same control to the corresponding MapService Layer in LayerList widget. Eg: In Layer list I have []Dimension---Feature Service []Dimensions----Map Service In Edit Widget []Dimension In Edit widget when I check the []Dimension, corresponding []Dimension is checked in LayerList widget. However I also want []Dimensions to be checked. How can I achieve this? Really appreciate you comments. Thanks. Saugat
... View more
07-02-2012
09:33 AM
|
0
|
0
|
220
|
POST
|
I am trying to save the length of drawn graphic in the feature attribute. I have got the length of line feature. However, When I try to add it in editsStartingHandler I never have the calculated length available. I know this is because of the Async nature of flex, but I wanted to know where could I add the appropriate event listener function.
In populateEditor(), we have
oplList .layer.removeEventListener(FeatureLayerEvent.SELECTION_COMPLETE, featureLayer_selectionComplete);
oplList .layer..addEventListener(FeatureLayerEvent.EDITS_STARTING, editsStartingHandler);
//oplList .layer..addEventListener(GeometryServiceEvent.LENGTHS_COMPLETE, editsStartingHandler); This returns geometry event which I cannot use in editsStartingHandler().
oplList .layer.addEventListener(FeatureLayerEvent.SELECTION_COMPLETE, featureLayer_selectionComplete, false, 1);
private function editsStartingHandler(event:FeatureLayerEvent):void
{
//////////////////////////////////////////NEW ADDITION FOR ADDING LENGTH ON MAP /////////////////////////////////////////////////
var geom:Geometry = new Geometry();
var spatialref:Number=102003;
var outSR:SpatialReference = new SpatialReference(spatialref);
geom=event.adds[0].geometry;
geometryService.project([ geom ], outSR);
//var tok1:AsyncToken =geometryService.project([ geom ], outSR, new AsyncResponder(projectCompleteHandler, proj_fault, tok1));
//tok.addResponder(new AsyncResponder(projectCompleteHandler, proj_fault, tok));
var polyline:Polyline = geom as Polyline;
//ViewerContainer.addEventListener("lengthCalc", sendServer);
Alert.show("DONE!!!!");
Alert.show(lengthFea.toString());
trace("Before event.add");
if (event.adds)
{
event.adds[0].attributes['transformation_transaction_id'] = ttid;
event.adds[0].attributes['user_id'] = userIDNum;
event.adds[0].attributes['user_name'] = userName;
event.adds[0].attributes['active'] = _activeNo;
event.adds[0].attributes['phase'] = "ACTIVE";
event.adds[0].attributes['len'] = lengthFea;
}
}
private function editsStartingHandler(event:FeatureLayerEvent):void
{
//////////////////////////////////////////NEW ADDITION FOR ADDING LENGTH ON MAP /////////////////////////////////////////////////
var geom:Geometry = new Geometry();
var spatialref:Number=102003;
var outSR:SpatialReference = new SpatialReference(spatialref);
geom=event.adds[0].geometry;
geometryService.project([ geom ], outSR);
//var tok1:AsyncToken =geometryService.project([ geom ], outSR, new AsyncResponder(projectCompleteHandler, proj_fault, tok1));
//tok.addResponder(new AsyncResponder(projectCompleteHandler, proj_fault, tok));
var polyline:Polyline = geom as Polyline;
//ViewerContainer.addEventListener("lengthCalc", sendServer);
Alert.show("DONE!!!!");
Alert.show(lengthFea.toString());
trace("Before event.add");
if (event.adds)
{
event.adds[0].attributes['_id'] = id;
event.adds[0].attributes['user_id'] = userIDNum;
event.adds[0].attributes['user_name'] = userName;
event.adds[0].attributes['active'] = _activeNo;
event.adds[0].attributes['phase'] = "ACTIVE";
}
}
private function projectCompleteHandler(event:GeometryServiceEvent):void
{
var geom:Geometry = (event.result as Array)[0];
var lengthsParameters:LengthsParameters = new LengthsParameters();
var pLine:Polyline = Polyline(geom);
lengthsParameters.geodesic = true;
lengthsParameters.polylines = [ pLine ];
//var tok2:AsyncToken =geometryService.lengths(lengthsParameters, new AsyncResponder(lengthsCompleteHandler, proj_fault, tok2));
geometryService.lengths(lengthsParameters);
}
//private function lengthsCompleteHandler(result:Object, token:AsyncToken):void
private function lengthsCompleteHandler(event:GeometryServiceEvent):void
{
var leng = (event.result as Array)[0]*3.28;
var data:Object=
{
length:leng
}
ViewerContainer.dispatchEvent( new AppEvent("lengthCalc",data) );
}
//private function sendServer(event:AppEvent):void
{
//var lengthFea:String=event.data.length.toString();
//Alert.show(lengthFea.toString());
}
I am trying to find the Drawend event or the place where I can add the event listener before events.add[] and add a events.add[] in that listener function . I have used event listeners and asyc token responder...however I cannot catch the drawend event in this widget. Some help would be greatly appreciated. Thanks.
... View more
06-25-2012
10:18 AM
|
0
|
0
|
705
|
POST
|
Hi all, How can I proceed of getting a length of a polyline using Edit Widget, similar to the way we get length in Draw and Measure Tool. I need to display the length of the line on map once I complete drawing it with the Edit widget. Thank you.
... View more
06-20-2012
10:03 AM
|
0
|
1
|
298
|
POST
|
Hi, I have few buttons in Layerlist widget which sends a new query request via dynamic layer layerdefinition to get a new map. For this I have
var data:Object = {
query1:(populationIndex.toString())
}
ViewerContainer.dispatchEvent( new AppEvent("newQuery",data));
I can receive this in Mapmanager.mxml pretty easily by ViewerContainer.addEventListener("newQuery", func1); Now I want the same newquery string in the Identify widget so that it can be applied as identifyParams.layerDefinitions= defQuery; However, when I use the same code i.e ViewerContainer.addEventListener("newQuery", func1); in Identify Widget's init() function it does not seem to get the new string. I believe this is because the widget is still closed and could not listen to the event. When the widget is open it works fine. How can i get this work even when the Identify widget is closed so that it can reserve the new query string until its open and used. I think once its open it can listen and there will be no issue. How can it listen in its closed state?
... View more
02-23-2012
10:10 AM
|
0
|
0
|
389
|
POST
|
Robert, In var dLayer:ArcGISDynamicMapServiceLayer = map.getLayer("yourlayerID") as ArcGISDynamicMapServiceLayer Does getLayer("yourlayerID") need to have ID of all the layers? For eg: If my dynamic map service has 5 layers and I want all the layers but the query applied only to layer 3. I still want the other layers only layer 3 with a different query. Is this correct below? private function chgQuery(event:AppEvent):void
{
var lquery:String = new String();
lquery = (event.data.newqr.toString());
var layerDefArr:Array = [];
layerDefArr[2] = "STATE=" + lquery; //the number 2 is for the 3rd layr in the dynamic map service
var dLayer:ArcGISDynamicMapServiceLayer = map.getLayer("0,1,2,3,4") as ArcGISDynamicMapServiceLayer
dLayer.layerDefinitions = layerDefArr;
} Do we also need map.addLayer(dLayer); in the end? Thank you.
... View more
01-25-2012
06:56 AM
|
0
|
0
|
341
|
POST
|
Hi all, I have two buttons(button1 and button 2) in my layer list widget. The purpose of the buttons is to send a different query to ArcGIS Server and get a map returned. For this purpose I have var data:Object = { newqr:(state[index].toString()) } ViewerContainer.dispatchEvent( new AppEvent("newQuery",data)); and in Mapmanager.mxml init() I have ViewerContainer.addEventListener("newQuery", chgQuery); private function chgQuery(event:AppEvent):void { var lquery:String = new String(); lquery=(event.data.newqr.toString()); newSDEquery= "STATE=" + lquery; } Once I receive this from layerlist widget in Mapmanager.mxml I try to plug it in function addLayerToMap(layerObject:Object) under case dynamic as dynLayer.layerDefinitions= newSDEquery; However I never get the map with new query results. I just need the map with query results. However I still have the same old map before I send a query. It would be great if someone could enlighten me to what needs to be done. I am using Flex Viewer 2.3.1. Thank you.
... View more
01-25-2012
05:28 AM
|
0
|
4
|
933
|
POST
|
Hi Robert, Is there a way we could simply hide the layer names in TOC so that it does not appear. I have a string of booleans coming from java (1,0,1,0,0....) which matches the layer order structure in map service. The string keeps changing depending on different views user can choose (Views are basically extent) fromm a drop down. Each view has its own set of mandatory layers to be on/off. I was able to get the different layers on/off with views. When I have 1 I use
if (Arr =="1")
{
itm1.children.visible=true;
k=k+1; //For Group Layers
}
and
if (Arr =="1")
{
itm1.children.children .visible= true;
k=k+1; //For SubLayers in group
}
With the 0s I simply do not want them to appear on the TOC. How can I achieve this. I simply want to hide them and exclude from the TOC without using excludelayer property. Can some display property make this invisible. Thanks.
... View more
12-03-2011
01:14 PM
|
0
|
0
|
279
|
POST
|
Hi Robert Thanks for the comment. How can I gain access to the older version of this widget? I am looking for 2.3.9.1 i.e I beleive just before flexViewer 2.4 release. Thanks.
... View more
11-08-2011
12:27 PM
|
0
|
0
|
313
|
POST
|
Hi Robert, I want to remove some sublayers from the TOC. I have a dynamic map service
<operationallayers>
<layer label="City" type="dynamic" visible="false" alpha="1"
url="http://*******/arcgis/rest/services/City/MapServer"/>
</operationallayers>
So the TOC looks like City -Parks -Schools -Police Station -Fire I just want to show Parks, Schools and Police station but hide "Fire" in the TOC. I believe <excludelayer></excludelayer> hides the entire dynamic layer. How can I acheive this? Thanks.
... View more
11-07-2011
12:03 PM
|
0
|
0
|
345
|
POST
|
Hi Robert, thanks for the comment. I think if I have the feature access enabled in the map service, probably we can control it. The problem is that I have 10 group layers and at least 5 sublayers in each group layer. Feature service would create a great amount of delay for 100+ layers I have (every time zoom in/zoom out will send me back 100+ images). Is there any other workaround you can think of other than creating feature service or map service for each of the layers(or grouplayer).
... View more
10-20-2011
09:36 AM
|
0
|
0
|
345
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|