|
POST
|
Thanks Dasa I accomplished this in pretty much the same way. I'm posting the code below in case it helps anybody but I think it does the same as what you posted but in a much less elegant way. The code takes a result set that is returned from a relationship query. this result set has only one feature set, a collection of line features. Each feature has an attribute called Bearing that has values in decimal degrees. This attributed is then formatted formatted to bearing distance format and then added to an array collection that is bound to a data grid. private function onRelatedLines(results:Object, token:Object = null):void { var intBearing:Number; var strPrefix:String; var steSuff:String; var strDegrees:String; var strMinutes:String; var strSeconds:String; for each( var RelatedResultFS:FeatureSet in results) { graphicsLayer.graphicProvider = RelatedResultFS.features; for each( var RelateResultGraphic:Graphic in RelatedResultFS.features) { intBearing = RelateResultGraphic.attributes.Bearing; if (intBearing >= 0 && intBearing <= 360) { if (intBearing >= 0 && intBearing < 90) { strPrefix = "N"; steSuff = "E"; intBearing = intBearing; } else if (intBearing >= 90 && intBearing < 180) { strPrefix = "S"; steSuff = "E"; intBearing = 180 - intBearing; } else if (intBearing >= 180 && intBearing < 270) { strPrefix = "S"; steSuff = "W"; intBearing = intBearing - 180; } else if (intBearing >= 270 && intBearing <= 360) { strPrefix = "N"; steSuff = "W"; intBearing = 360 - intBearing; } strDegrees = String(Math.floor(intBearing)) + String.fromCharCode(186); strMinutes = String(Math.floor((intBearing - Math.floor(intBearing))* 60)) + "'"; strSeconds = String(Math.floor((((intBearing - Math.floor(intBearing))* 60) - Math.floor((intBearing - Math.floor(intBearing))*60))*60*100)/100) + "''"; RelateResultGraphic.attributes.Bearing = strPrefix + strDegrees + " " + strMinutes + " " + strSeconds + " " + steSuff; arrcParcelLinework.addItem(RelateResultGraphic.attributes) } } } }
... View more
08-02-2011
08:37 AM
|
0
|
0
|
2788
|
|
POST
|
I'm working with the parcel fabric and it seems the database stores line bearings as decimal degrees. Has anybody had to use flex to convert from decimal degrees back to bearings and quadrants? e.g. 109.4256 to S 70 34' 28" E If anybody has had to do this already and has an actionscript function / formula or something similar they could give me that would be super. Thanks for any help
... View more
06-21-2011
03:44 PM
|
0
|
2
|
9618
|
|
POST
|
Can you have your IT dept. monitor the firewall to see if anything gets logged? Your cross domain looks to be the same as the one I use on our public server except I don't have encoding="UTF-8" in the header
... View more
05-25-2011
11:55 AM
|
0
|
0
|
694
|
|
POST
|
I am not familiar with the proxy.ashx file. Where is it located? I had issue setting this up using the tokens/gettoken.html page. My issue was I didn't have url rewiting set up properly on the web server for arcgis/tokens*. There was also something about about specifying https:// as well as http:// in the rule.
... View more
05-12-2011
10:55 AM
|
0
|
0
|
456
|
|
POST
|
I don't think you can use the identify widget to consume a web service or use one of its operations. You would have to use flex to consume the web service. There is a tool that will automatically generate the classes you need to consume the service and its operations click Data>Connect to Data/Service then choose web service. From there you give the url and the operations you want to use. You will manually have to call the resulting classes from code
... View more
05-12-2011
10:23 AM
|
0
|
0
|
256
|
|
POST
|
maybe try result.feature.attributes ["FIELDNAME "] instead?
... View more
05-12-2011
10:06 AM
|
0
|
0
|
331
|
|
POST
|
I haven't worked with clustering but Mansour wrote a post about extending the flare symbol class that might be of some use to you. http://thunderheadxpler.blogspot.com/2010/08/image-flare-symbol-for-clustered.html
... View more
04-07-2011
09:36 AM
|
0
|
0
|
713
|
|
POST
|
OK figured it out. When a group layer is toggled on all sub layers are turned on automatically. If this is not the desired behavior do not toggle on the group layer, instead toggle on just the desired sub layers. Sub layers will be visible even when the parent layer is not part of the visibleLayers array. I didn't see this documented anywhere and it is different behavior than ArcMap.
... View more
04-07-2011
09:28 AM
|
0
|
0
|
468
|
|
POST
|
Thanks you this was killing me. I couldn't figure out why sublayers that were not on by default kept appearing when I toggled a group layer. I found no documentation about this and it is different than how ArcMap works.
... View more
04-07-2011
09:21 AM
|
0
|
0
|
493
|
|
POST
|
I'm having an issue with turning on and off layers. I am programmatically swapping between different group layers. The problem is that all all sub layers in a group layer turn on, not just those that are already set to visible. I have tried to loop through the sub layers adding only the ones I want to the visibilelLayers array but when the map redraws all the layers are turned on. I know my looping works because I look at the visibileLayers array in the debugger and the correct ids are present but at some stage this get overwritten and all the sublayer ids are returned by the server Is this default behavior and is there a way around it? I have included my code below. I have a function that takes a layerInfo object and adds its id to the visibileLayers array. It then loops through the sublayers array and if the default visibility is true it also adds the sublayer to the visibileLayers. private function addLayer(layerInfo:LayerInfo):void { SiteProfileService.visibleLayers.removeAll(); SiteProfileService.visibleLayers.addItem(layerInfo.id); if ( layerInfo.subLayerIds.length > 0) { var sublayers:Array = layerInfo.subLayerIds; for (var i:int = 0; i < sublayers.length; i++) { trace (SiteProfileService.layerInfos[sublayers].name); trace (SiteProfileService.layerInfos[sublayers].defaultVisibility); if (SiteProfileService.layerInfos[sublayers].defaultVisibility == true) { SiteProfileService.visibleLayers.addItem(sublayers); } else { var idIndex:int = SiteProfileService.visibleLayers.getItemIndex(sublayers); if (idIndex != -1) { SiteProfileService.visibleLayers.removeItemAt(idIndex); } } } } }
... View more
04-05-2011
09:00 PM
|
0
|
1
|
1628
|
|
POST
|
Andrew Just an FYI and for the sake of anybody else coming across this thread. I figured out why I'm getting inaccurate measurements when I do my calculations and it should have been obvious. It is because the map service I'm measureing against is Web Mercator projection which is horrible for distance distortions, especially at higher latitudes. Continuously reprojecting a polyline as it's drawn is not practical so I'm kind of cheating and using an approximate distortion scale of 20%. It's crude but it seems to work so far. I'm sure somebody has worked out a formula for my latitude I sure but I can't find it. Thanks
... View more
01-19-2011
03:22 PM
|
0
|
0
|
613
|
|
POST
|
Thanks for your help guys. I've figured out how to get the coordinates in real time using the mouse move event and I tried to do the calculations to get distance. I was using good old Pythagoras, d= �??(x2 - x1)² + (y2 - y1)² but it doesn't appear to be accurate enough and my distances are always several meters too large. Does anybody have a more accurate formula? I'm sure it will involve lots of high school trigonometry that I have long since forgotten but if anybody has any pointers please let me know. Thanks again
... View more
01-19-2011
11:26 AM
|
0
|
0
|
613
|
|
POST
|
Has anybody created a measure tool in Flex? All the sample I can see add the length of the graphic as a label after the draw tool has finished drawing. I need the user to be able to see the length of a polyline as they are moving the mouse to create it. I have looked at the drawing toolbar events but all I can see are start drawing and end drawing, no way to get to the graphic that is actually being created. Any help or suggestions greatly appreciated.
... View more
01-18-2011
01:31 PM
|
0
|
5
|
2722
|
|
POST
|
C_R_C Did you ever figure this out? I'm having the same problem. I can't log on the the rest admin console with any account, be it local in the agsadmin group or the network admin account. Everything else appears to be working fine. ArcServer 10 on Windows server 2008
... View more
11-02-2010
03:11 PM
|
0
|
0
|
1510
|
|
POST
|
Just wondering how long it has taken users to migrate their apps to the latest apis? I have 3 apps of varying complexity but i don't yet have access to ArcServer 10 or Flash Builder 4 for testing. I'm trying to estimate the time it will take when we do decide to upgrade. 1 of my apps is pretty straight forward, just recording where users click on a map, the others are a bit more complex, using geoprocessing services, reprojecting and consuming 3rd party web services. So I was wondering what everybody else s experience was? Thanks for any advice/comments you might have
... View more
08-24-2010
12:56 PM
|
0
|
1
|
564
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-21-2025 01:39 PM | |
| 1 | 07-29-2025 10:45 AM | |
| 1 | 07-17-2025 03:33 PM | |
| 1 | 07-10-2025 10:30 AM | |
| 1 | 06-30-2025 12:07 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|