|
POST
|
I meant in the viewer application. The Widgets tab that has the icons for each widget. The new ones are not in there.
... View more
12-19-2012
06:59 AM
|
0
|
0
|
1175
|
|
POST
|
Thanks Anthony. Not exactly sure what you mean though. I have been trying to code the ability to drag a layer from the main large TOC to the Working Set TOC but have not been able to figure it out. It never lets me drag anything. I do not see in your code how that works. I see the part of the map accepting the drag but nothing that allows the drag. It is just beyond me as a newbie I guess. I have it working where a user checks the visible box in the main TOC and it shows up in working set. I am now looking into a way to remove a layer from the Working Set TOC (through an icon or menu item I guess). I also am going to try and find a way to save the list of layers out to a users computer and then be able to add the list back in (saving the session state of the Working TOC basically). Thanks
... View more
12-19-2012
06:56 AM
|
0
|
0
|
4715
|
|
POST
|
Do we need to add the new widgets in manually to the viewer? I see them in the source code but they do not show up as options in the new viewer. Thanks
... View more
12-18-2012
11:36 AM
|
0
|
3
|
2554
|
|
POST
|
I am at a large govt agency so all the servers are handled by an outside contractor and I do not get to have much insight into this. It sounds like they are trying just one large machine but as a former server room guy I have my doubts, lets just say that. I did end up creating a "Working Set TOC". It automatically adds any layer that is made visable during the session. I might also add a Add To option in the main large TOC. The dragging is a cool idea but probably beyond my capabilities as a new Flex guy (I might look into it as a challenge). If you want to see how I got this Working Set TOC to work I posted the code as part of this post - http://forums.arcgis.com/threads/72877-Why-is-Legend-Widget-still-updating?p=255217#post255217 We do have plans for a search function, the autocomplete would be cool, I will have to look into it. We want to add the saving of session info but the policy people will not let us. Thanks for the ideas.
... View more
12-14-2012
05:34 AM
|
0
|
0
|
4715
|
|
POST
|
EDIT: Made it more efficient by only setting listeners for nonbasemap layers. Well I finally found a way to do it. I tried this before I thought but now it works. This shows you how to listen for changes in Layer Visibility and also allows for a "Working Set TOC". This Working Set has just the layers that have been turned on for the current session. It basically adds an event for every layer to listen for FLEX.Show (showing the layer). It also builds a start list that contains all the exclude layers and all the map layers so that the TOC starts blank. Then when the show event kicks it removes that layer from the list of layers to exclude. All checkmarks and such sync in the two TOCs. The move up and down also syncs though, which i do not want. I will work on that. Hope it helps someone. If this is wrong let me know. This is my first Flex work. 1. Copy the MapSwitcherWidget, paste and rename as MapSwitcherWidget2. 2. Add a line so that it compiles the MapSwitcherWidget2 3. In the new MapSwitcherWidget2 modify the initTOC and add a function. These are the changes /* Added by me */ private function mapLayerAddHandler2(event:Event):void { templist.removeItemAt(templist.getItemIndex(event.currentTarget.id)); } private function initTOC(expandLayerItems:Boolean = false):void { toc2.map = map; /* this will also stop layers from being listed */ toc2.isMapServiceOnly = false; //gotta get this from the config file /*toc2.excludeLayers = getExcludeLayers();*/ toc2.basemapLayers = getBasemapLayers(); templist = getExcludeLayers(); var layerlist:ArrayCollection = map.layers as ArrayCollection; for (var j:int = 0; j < layerlist.length; j++) { if (toc2.basemapLayers.getItemIndex(layerlist .id) == -1) { layerlist .addEventListener(FlexEvent.SHOW, mapLayerAddHandler2, false, 0, true); } templist.addItem(layerlist .id); }
... View more
12-07-2012
09:57 AM
|
0
|
0
|
1165
|
|
POST
|
I have gone through every line of every file that has to do with the TOC and legend and I still can not find the spot where the legend knows a layer has been turned on. Anyone know where this happens? It is not an event listener since it still works without it somehow.
... View more
12-06-2012
08:47 AM
|
0
|
0
|
1165
|
|
POST
|
I am not sure if this will help but when I did a Python Excel script there was a way to check the Excel "cell_type" which is equal to 0 when the cell is blank.
... View more
12-05-2012
12:04 PM
|
0
|
0
|
1574
|
|
POST
|
I thought I was getting this figured out but it is not doing what I thought. In the LegendWidget there is the code map.addEventListener(MapEvent.LAYER_ADD, mapLayerAddHandler, false, 1); map.addEventListener(MapEvent.LAYER_REMOVE, mapLayerRemoveHandler, false, 1); If I comment out this code the legend still updates itself. How does it do this? If I comment out the line myLegend.map = map; after these lines that does stop it from updating the legend. So maybe there is another event buried in the map? Not sure why there would be two. I want to know because I want to add a layer to a second TOC when it is checked in the first one. I thought I would create this event and then work on how to add it to the second TOC (which may be tough since it seems to always connect to the map). Thanks doug
... View more
12-05-2012
11:10 AM
|
0
|
2
|
1551
|
|
POST
|
Thanks Brian. This is actually exactly what we have now. But it is still getting really long with the 300 or layers in there so far. We are looking into a "See More" button to limit the number of layers displayed in each subcategory. Only bummer there is that we will then have to add each layer one by one to the list instead adding the whole map at once. I looked at UI options all day Friday but did not see anything I wanted. Maybe using carousels or as someone drills down the current structure appears at the top. But nothing seems to be a good fit so far. The idea I have now is to leave the TOC like yours and then create a "Working Layers" widget. This would be a TOC for just the current session. That way people do not have to go hunting back through the huge list just to toggle layers. Whenever a layer is turned on in the big list it automatically gets added to the Working Set. A user could also click Add to Working Set in the TOC without turning it on. Anyone done anything like this? Thanks
... View more
12-03-2012
08:08 AM
|
0
|
0
|
4715
|
|
POST
|
Just seeing if anyone has ideas on a cool TOC that would work with with 1,000+ layers. There would be several categories and subcategories. Maybe a See More feature. I thought I would find a whole bunch of cool Flex options out there but so far have found nothing. I am open to any style, does not have to be a simple carrot dropdown tree thing (whatever you call it). Something precoded I am not going to have to build all from scratch. I know having a TOC that big is not usually recommended but this is going to be a huge central repository so it needs to be that way. Any ideas or links to websites that have samples are very appreciated. For an example of "different" I mean things like http://www.visualcomplexity.com/vc/ Thanks a lot.
... View more
11-30-2012
08:30 AM
|
0
|
10
|
5783
|
|
POST
|
When I was watching the User Conference they talked a little about new advanced query commands in 10.1 that could do this. You sent a query and in it told it to sum values based on a polygon. That is all I know about it.
... View more
10-16-2012
05:58 AM
|
0
|
0
|
1223
|
|
POST
|
I found it!! Ok I had to check the box in the tool "Run Python script in process" or it will not work. I wanted the command window to show so the user could see error messages. But I guess you can't do that. Wow that took a long time to find. I call this a BUG!
... View more
05-21-2011
07:31 AM
|
0
|
0
|
1515
|
|
POST
|
Ok i just tried and i can run a simple script with PointDensity in PythonWin itself. import arcpy arcpy.CheckOutExtension("Spatial") print "here25" tmpRast = arcpy.sa.PointDensity("C:/temp/test2.shp","NONE") print "here3" But when I try to call this simple script from ArcMap in a toolbox it does not work. So there is something wrong with using PointDensity in a script called from a toolbox I guess??
... View more
05-21-2011
06:54 AM
|
0
|
0
|
1515
|
|
POST
|
The PointDensity tools takes a feature layer in not a raster - a raster is the output. So not sure what you are saying here. This same error came up with the join tool so i had to use a MakeFeatureLayer first then it worked. But for PointDensity it did not work. I have spent 8+ hours on this trying all kinds of paths, different test files, hardcoding everything, a geodatabase, you name it. It just keeps giving the 582 data type error. I dont know what it wants. I can run it on the same files in arcmap using the point density tool directly but in script it dies on those exact same files. I have no idea what else to try.
... View more
05-21-2011
06:31 AM
|
0
|
0
|
1515
|
|
POST
|
So i am updating a python script i wrote in 9.3 to v10. For some reason it keeps giving me a 582 error - which means the parameters are not valid. The parameters did change a lot in v10 (why I do not know) including not taking the output raster name as a parameter (weird). So I made the appropriate changes with no luck. I even took out ALL parameters but the two required ones and it still will not run. I have tried everything. It is not a extension problem as I tested that and it gives a different error. i already tried _sa, etc with no luck. here is the simplified call import arcpy, sys, os from arcpy.sa import * arcpy.Merge_management(fileList, mergeName) # Check out ArcGIS Spatial Analyst extension license - need for v10 arcpy.CheckOutExtension("Spatial") print "here1" # Run density tool with given params print "here2" myNbrCircle = NbrCircle(int(radiusSize), "MAP") print "here25" tmpRast = PointDensity(mergeName, "NONE") print "here3" It prints here25 but not here3. i know in other scripts it was an issue with having to use make feature layer first for some reason but I tried that with no luck. I dont have that script to check the exact steps. there is nothing in the help about feature layer versus feature class which was the issue before. Esri sure likes the word feature. Any help is appreciated. I just want get it to run simple then I will add in the new Nbr and such. This is the 9.3 call that worked just fine gp.PointDensity_sa(mergeName, "NONE", rasterName, int(cellSize), "Circle " + str(radiusSize) + " Map", "ACRES")
... View more
05-13-2011
11:22 AM
|
0
|
6
|
1623
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 2 | 04-10-2026 11:25 AM | |
| 1 | 04-09-2026 02:37 PM | |
| 1 | 04-07-2026 08:33 AM | |
| 2 | 03-23-2026 03:44 PM |
| Online Status |
Online
|
| Date Last Visited |
5 hours ago
|