|
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
|
1633
|
|
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
|
1193
|
|
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
|
1184
|
|
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
|
613
|
|
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
|
1685
|
|
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
|
1953
|
|
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
|
1685
|
|
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
|
1685
|
|
POST
|
I am talking about MapSwitcherWidget which this does not seem to work for. Thanks
... View more
02-20-2013
07:10 AM
|
0
|
0
|
1953
|
|
POST
|
Well I found out the trick was to call toc.validateNow(); before making the calls to .expandItem. Also my call did not seem to have enough arguments. But another question is there any documentation on the .expandItem call? I want to know what all those true values are for. I also want to make sure I am using it to collapse correctly. I tried all false like this and it works but not sure what it all might be doing toc.expandItem(toc.dataProvider.source,false,false,false,null); -------- Here is my full code. toc.validateNow(); var i:int; for (i = 0; i < toc.dataProvider.source.length; i++) { if (toc.dataProvider.source.label == mapStr) { toc.expandItem(toc.dataProvider.source,true,true,true,null); toc.validateNow(); var j:int; for (j = 0; j < toc.dataProvider.source.children.length; j++) { if (toc.dataProvider.source.children .layerInfo.name == grpStr) { //toc.expandChildrenOf(toc.dataProvider.source,true); toc.expandItem(toc.dataProvider.source.children ,true,true,true,null); } else if (toc.dataProvider.source.children .layerInfo.name == layerStr) { toc.expandItem(toc.dataProvider.source.children ,true,true,true,null); } } } else toc.expandItem(toc.dataProvider.source,false,false,false,null); toc.validateNow(); { } } toc.validateNow();
... View more
02-14-2013
08:50 AM
|
0
|
0
|
636
|
|
POST
|
I can only get 2.5 or 3.1, 3.0 does not seem to be anywhere. We have a 2.5 widget that uses locateTask.addressToLocations(myAddress, myOutFields, new AsyncResponder(onResult, onFault)); and this is totally different in 3.1 due to changes in 10.1. But I want to see if this is also different in 3.0 or not. That might seal the deal on if we are going to use 3.0 or 3.1. Thanks.
... View more
02-05-2013
07:29 AM
|
0
|
1
|
953
|
|
POST
|
I want the last map service name added to the TOC MapSwitcherWidget to expand after the map/layer is added. I can get all of them to expand using this this.toc.expandLayerItems(); But I have tried all kinds of code to get that last item added to open but nothing works. It seems like one of these should work but it does not. toc.expandChildrenOf(toc.firstVisibleItem,true); toc.expandItem(toc.firstVisibleItem,true); Forgot to add tried this also this.toc.openItems.push(toc.firstVisibleItem); Any ideas? Thanks.
... View more
02-04-2013
09:42 AM
|
0
|
1
|
926
|
|
POST
|
I do not have the full solution done but thought I would post this as it may help someone. I found down in TOCMapLayerItem.as a function called createChildren() where the layers in the map service are added I was able to add an if statement here to only list the layers (children) I want. It just works off a global var for now (I know that is cheating). my new code is under the else in the adding of dynamic map service layers section else { /* OLD layerInfos = _dynamicMapServiceLayerInfos;*/ /* added by me */ layerInfos = []; for each (var layerInfo:LayerInfo in _dynamicMapServiceLayerInfos) { if (Application.application.SubLayers.indexOf(layerInfo.name) != -1) { layerInfos.push(layerInfo); } } I might need to add this above the else, if _isVisibleLayersSet is ever used but it does not seem to be used so far? It does work in my demo great. Going to work on an option to remove the map service name from the mapswitcher widget as well using toc.categories. Thanks for the help and I will post the full solution when i get it.
... View more
01-31-2013
12:00 PM
|
0
|
0
|
701
|
|
POST
|
Thanks R_. I do not think they (the ups) are going to want to use his widget so I have to recreate just that part. I am surprised this was not build in from the beginning. It is confusing that the <layer> tag is used for a map service. Roberts is so much easier to understand (I have this map service and I want these layers from it). We will also be bringing in layers from other organizations and we may want to have one of the layers from their map service listed in one spot and another somewhere else. I keep going to exclude layers like you say but i would really like to have a blank map and then load in layers as I go (since there will be 1,000+ layers over many map services - some in house, some not). Just like how ArcMap works, you start with a blank TOC and then add in layers using a Add Data button - you think esri would have made them similar. But when i drill down in the code to where a layer is actually added I eventually hit a spot where the source code is no longer supplied. I have another feature that lets a user save the list of layers they picked out so that say the next day they can reload and keep working or send it to someone else (a save map). I have it working with using exclude but the file is weird to look at since it actually lists the opposite of what they had. I am trying to build the biggest web map ever but the code assumes just a little simple one is the issue I think. I will go through Roberts code a 5th time and see if I can find it. Thanks again.
... View more
01-29-2013
12:04 PM
|
0
|
0
|
701
|
|
POST
|
Did you modify the toc.exludelayers? I am trying just this as a test but it is not working. excludedLayers = new ArrayCollection; var excludes:Object ={ name: "MapTest", ids: [1,2,3,4,5], isbasemap: false } excludedLayers.addItem(excludes); toc.excludeLayers = excludedLayers; Thanks
... View more
01-29-2013
09:37 AM
|
0
|
0
|
1742
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 2 | 3 weeks ago | |
| 1 | 4 weeks ago | |
| 1 | 4 weeks ago | |
| 2 | 03-23-2026 03:44 PM |
| Online Status |
Online
|
| Date Last Visited |
6 hours ago
|