|
POST
|
I prefer the URL method listed above but you can also use the Attachment Manger and attach the files directly into the geodatabase.
... View more
08-13-2013
10:09 AM
|
0
|
0
|
1138
|
|
POST
|
In one version of mine i did add code to TOC.itemrender - in the createchildern function i think. But in another version I setup a listener on the Show of a layer. This might work best for you since you want to take action when a layer is checked (made visible). You can set the listener for just the layers you want. The code for this is layerlist .addEventListener(FlexEvent.SHOW, mapLayerAddHandler2, false, 0, true); where mapLayerAddHandler2 is your function. I wanted my procedure to run whenever any layer, except basemaps, were made visible. That code looks like this. for (var j:int = 0; j < layerlist.length; j++) { if (toc.basemapLayers.getItemIndex(layerlist .id) == -1) { layerlist .addEventListener(FlexEvent.SHOW, mapLayerAddHandler2, false, 0, true); } } Hope that helps.
... View more
08-07-2013
09:33 AM
|
0
|
0
|
825
|
|
POST
|
I did something similar to expand children. If you have one child then ask it for the parent. Then ask the parent what other children it has. Like this toc.dataProvider.source.children .layerInfo.name
... View more
08-06-2013
07:20 AM
|
0
|
0
|
825
|
|
POST
|
So from the code it looks like this adds the shapefile data to Flex locally and does not send or store any data on any server correct? Has anyone ever seen a widget like this to add a Layer (or Layers) from a REST service? We would like a way for users to add a REST data layer to our Flex app to see with our data (just like a shp file). Thanks
... View more
07-10-2013
08:46 AM
|
0
|
0
|
1711
|
|
POST
|
When I had to do this I just "cheated" and used a global var. It was just so much easier.
... View more
05-03-2013
06:05 AM
|
0
|
0
|
868
|
|
POST
|
Same way as the chart. Read the data into an array then assign that array as the data provider of the tree control.
... View more
04-30-2013
07:10 AM
|
0
|
0
|
436
|
|
POST
|
The basics are to read the data into an array in the proper format, then give that array to the chart. Not sure what you are charting with. Esri chart widget, Flex charting directly, or something like FusionCharts?
... View more
04-29-2013
10:24 AM
|
0
|
0
|
599
|
|
POST
|
If i type this into Chrome it grabs the file and "downloads" it for me. It may help you. file:///C:/windows/system32/notepad.exe
... View more
04-17-2013
12:47 PM
|
0
|
0
|
1195
|
|
POST
|
I did this by adding and if statement to the CreateChildren function in TOCMapLayerItem.as. I kept a global var of layers and sublayers I wanted and checked against that in the if statement. I did this because my TOC was dynamic. For your case you could just read from a xml and check against it. Put the if statement around layerInfos.push(layerInfo); Hope that helps. http://forums.arcgis.com/threads/76052-A-way-to-access-a-layer-inside-a-map-service-without-accessing-it-as-a-feature-layer?p=268843#post268843
... View more
04-09-2013
06:42 AM
|
0
|
0
|
760
|
|
POST
|
XML Notepad from MS is not bad also. With Notepad++ I had to add the XML extensions but once i did they worked great. Has anyone ever seen an interface that allows a novice to fill out dialog box questions and it builds the XML for them? Like a python module or something. Thanks
... View more
03-14-2013
08:04 AM
|
0
|
0
|
763
|
|
POST
|
I had something similar where I wanted to expand the last thing added. You can use toc.expandItem(toc.dataProvider.source,true,true,true,null); where in your case the toc.dataProvider.source part would be the item you want to expand. The real trick for me was that after using toc.expandItem make sure to run toc.validateNow(); or nothing will happen. I thought there is a toc.collapseall or something like that but I can not find it. I found in mine that when something is added it collapses all of them anyways. The command toc.validateNow(); could make that happen. If you have a link to the item (the toc.dataProvider.source) above you can also change its font I think. There is code in there that changes the font for scale dependencies so maybe look for that. Check TocMapLayerItem.mxml. Hope that helps.
... View more
03-12-2013
09:28 AM
|
0
|
0
|
414
|
|
POST
|
I see you are adding the layer to the map using map.addLayer( which is good. I think that the toc is never getting this change. Right after each map.addLayer( in your code first try adding the line toc.validateNow();. My guess is no. Next try rerunning the init of the layer list widget so it reloads it. You might be able to just use the toc.map = map line but that may mess some stuff up. (Would also need the functions that go in here like getExludeLayers. Or kick an even off over to layer list that runs initTOC again on a change. If you need help with kicking an event it is actually something i can do.) In LayerListWidget.mxml private function initTOC(expandLayerItems:Boolean = false):void { toc.map = map; toc.isMapServiceOnly = false; //gotta get this from the config file toc.excludeLayers = getExcludeLayers(); toc.basemapLayers = getBasemapLayers(); toc.excludeGraphicsLayers = true; if (expandLayerItems) { toc.expandLayerItems(); } }
... View more
02-27-2013
09:16 AM
|
0
|
0
|
1124
|
|
POST
|
I can make it wider no problem. But I want the scroll instead. We have long layer names that are also nested in groups a lot of times. So the combo make it really long sometimes. Vertical scroll works fine so surprised this was missed. I might try to find a place to add a data tip function as a partial fix. I tried it here in MapSwitcher but it did not work <toc:TOC id="toc" left="2" right="2" top="3" bottom="40" dataTipFunction="myDataTipFunction" tabIndex="2"/>
... View more
02-21-2013
12:20 PM
|
0
|
0
|
1494
|
|
POST
|
Yes there is code in there to hide MapSwitcher if there are no op layers specified. I edited that line out. I can tell you where it is but now I am not sure if you are editing the code at all in Flash builder? If you can it is in MapSwitcherWidget.mxml in the initTOC function. The line to comment out is opLayersButton.visible = tocLayers.length ? true : false; After rereading your post my option in my other post may not work since it is based on the maps being all loaded but then not displayed by setting toc.includelayers = []. But you say it is displaying so it must be adding it but not adding it to the toc for some reason. If you are editing the code you could try my post by putting the code at the end of the geoprocessing widget you made. But I do not have high hopes it will work. Adding it to toc.includedlayers may also worth a try. Sorry I am new also so that is all i know.
... View more
02-21-2013
07:50 AM
|
0
|
0
|
1124
|
|
POST
|
This works for MapSwitcher and may work for layer list also. After the map is for sure added run this command toc.validateNow(); If that does not work I did this in another part to force MapSwitcher to be rebuilt toc.includeLayers.addItem("dummy"); toc.includeLayers.removeItemAt(toc.includeLayers.getItemIndex("dummy")); You could probably kick off a COLLECTION_CHANGE event i think it is but seem harder to figure out.
... View more
02-20-2013
08:16 AM
|
0
|
0
|
1124
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 3 weeks ago | |
| 1 | 11-26-2025 06:23 AM | |
| 3 | 4 weeks ago | |
| 1 | 11-04-2025 02:29 PM | |
| 1 | 11-25-2025 08:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|