|
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
|
2258
|
|
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
|
718
|
|
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
|
1090
|
|
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
|
1008
|
|
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
|
847
|
|
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
|
847
|
|
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
|
2133
|
|
POST
|
Rhett. This is exactly what I did at first and it worked great in my samples. But when I started on the real one I found that I could only exclude whole map services. Robert is correct I am talking about the MapSwitcherWidget. But I am not tied to it. Where is this TOCWidget? Maybe I can use it or just use the code inside of it that is making the exclude work. Edit: I found the widget - Roberts. Robert it looks like you give toc.excludelayers a Object that is the layer name, and id array, and basemap false? Any hint into how you made this work would be great. Thanks
... View more
01-29-2013
04:21 AM
|
0
|
0
|
2133
|
|
POST
|
Someone before me was able to do that - looks like they used this. toc.hideTopLevelItems = hideTopLevelItems; public function set hideTopLevelItems( value:Boolean ):void { _hideTopLevelItems = value; // Propagate this property to child TOC components for each (var toc:TOC in _childTocs) { toc.hideTopLevelItems = _hideTopLevelItems; } }
... View more
01-25-2013
06:31 AM
|
0
|
0
|
2133
|
|
POST
|
Robert. I then can change toc.categories to stop it from showing a tree nest structure right? I am guessing it will still show Map Service name -> Group Name -> Layer Name
... View more
01-25-2013
06:21 AM
|
0
|
0
|
2988
|
|
POST
|
Thanks a lot. I looked at it briefly but I wanted a different UI. Then when i hit the just one layer of a map service issue I had looked at so much stuff I forgot about it. Looks promising. But the issue I see is that it loads feature layers as /FeatureServer/0 but then they are not dynamically rendered like they are with /MapServer (at least if you say MapServer/0 they are not since they you have to say type feature not dynamic). I need to show one layer (sublayer) out of a MapServer in the TOC. So tell it - in this Map Service just put this sublayer in the TOC. Some of our Map Service have 190+ layers and I just want one of those - and since it has 103K polygons it needs to be dynamic. Maybe I can edit that in...
... View more
01-25-2013
06:14 AM
|
0
|
0
|
2988
|
|
POST
|
Thanks this is really close. Is this available in AS? The mxml seems static. I am thinking I would make the TOC just like in ArcMap. So I start with a empty TOC and Map (do not let the code load in the layers from the config.xml). Then when the user clicks on a layer name (which is a sublayer) I then tell the TOC/Map to add that sub layer. In other words the user click tells TOC to go ahead and load sublayer 0 of map service X. (But do not load (or just not show) in the TOC say sublayer 1 of map service X)
... View more
01-25-2013
05:49 AM
|
0
|
0
|
2988
|
|
POST
|
It looks like on demand mode just limits the features to the current extent. The problem is all of these are national layers and I am sure people will turn them on at the national (US) scale often. Zoomed in they are not that slow but full extent the browser can not even load all 100K features. There must be a way because you can make just one layer of a map visible. I am going to look into how the checkbox makes just one layer of the map visible.
... View more
01-25-2013
04:01 AM
|
0
|
0
|
2988
|
|
POST
|
Is there a way to use sublayers for this? So I can have the TOC display just one sublayer of a layer? This would also allow a user to reorder the draw order of sublayers.
... View more
01-24-2013
11:50 AM
|
0
|
0
|
2988
|
|
POST
|
I want to access one layer of a map service to show it in a list. I do not want to add it as a layer using /MapServer/0 in config.xml because then I lose the dynamic display properties that the /MapServer provides. (The layer has 100,000 features so it blows up as a feature layer.) Can I get at it in a Map Service or is there a way to add a just layer in config.xml that is dynamic display wise? Have tried many things. One was to publish a new map service each time but then there are so many map services the server bogs. Second was to use setMaxAllowableOffset as in this post http://forums.arcgis.com/threads/49416-maxAllowableOffset-on-operationalLayers. But the ZOOM_END does not seem to be firing in 3.1. This blog post http://blogs.esri.com/esri/arcgis/2011/06/13/feature-layers-can-generalize-geometries-on-the-fly/ says that this concept is what ArcGIS Online does. In the end all I want to do it be able to list layers multiple times, in multiple places, without having to create another Map Service all the time. In other words granular control over how and where layers (not whole maps) are listed while still keeping the dynamic display properties). Concept: Kinda like ArcGIS Online where I am building a map up from multiple layers, each of which may be in a different map service. Any ideas would be very appreciated, this has been struggled with for some time. thanks
... View more
01-24-2013
10:39 AM
|
0
|
22
|
6533
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 07:34 AM | |
| 1 | 2 weeks ago | |
| 1 | a month ago | |
| 1 | a month ago | |
| 1 | a month ago |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|