|
POST
|
Thanks for the info cc4ever but as drewgis mentioned we are having the same problem in that the event is never called...
... View more
06-13-2014
07:28 AM
|
0
|
0
|
1370
|
|
POST
|
You ever find a way around this? When we upgraded to 10.2 of the WPF API we are now experiencing this issue as well and our users are not liking it. It was either that upgrade or ESRI changed something with their services... either way, ArcMap does not have these issues so I'm hoping there is just some property to get around this limitation. Thanks for any info.
... View more
06-11-2014
08:16 PM
|
0
|
0
|
1370
|
|
POST
|
Should have waited to reply earlier... got it working now. The catch is that VisibleLayers cannot be null before using SetLayerVisibility. If it is null, SetLayerVisibility leaves it null and the problem still exists, but if it is initialized to anything, then the SetLayerVisibility loop resets it properly without the issue. So I just had to do:
VisibleLayers = new[] { 0 }; //Must initialize to anything but null, will be reset below.
foreach (LayerInfo layerInfo in Layers)
SetLayerVisibility(layerInfo.ID, layerInfo.DefaultVisibility);
Thanks much Dominique for leading us to a fix!
... View more
06-11-2014
04:27 PM
|
0
|
0
|
634
|
|
POST
|
Thanks a lot for the info Dominique, but maybe I am still doing something wrong. Tried setting the layer visibility using these methods a few ways:
foreach (LayerInfo layerInfo in Layers)
SetLayerVisibility(layerInfo.ID, layerInfo.DefaultVisibility);
foreach (LayerInfo layerInfo in Layers)
SetLayerVisibility(layerInfo.ID, GetLayerVisibility(layerInfo.ID));
But I still have the problem mentioned in number 1, and the disabled group layers are rendering. Am I doing something wrong? Maybe you could elaborate more on how I should be using those methods? Thanks again!
... View more
06-11-2014
04:07 PM
|
0
|
0
|
634
|
|
POST
|
In the layer's Initialized event we are setting the DynamicLayerInfos and then setting the min/maxScale. This is to get around the issue that dynamic layers do not allow you to extend outside the bounds of the published scale (http://forums.arcgis.com/threads/100223-DynamicLayerInfos-Changing-MinScale-Not-Working). So we have special services published with no scale and we are trying to initialize the default scales we want. This has caused a few additional issues though. When DynamicLayerInfos is set, layer visibilities are no longer obeyed. Though the TOC does not show them checked, the layers render (might just be the group layers, cant tell easily). Toggling one item in the TOC fixes the problem though and then things render fine. To get around this issue, I thought we could just set the VisibleLayers since it starts off null. Tried this one of two ways with issues: 1) Added the IDs for all the layers with layerInfo.DefaultVisibility == true. But this does not work where there are group layers that are disabled and the sub layers enabled. The parent group layer automatically gets checked even though its ID is not in the list. 2) Added the IDs for just the layers that are truly visible, so not the layers under a disabled group. But this of course does not check those sub layers in the TOC so when the outer group is enabled, the sub layers have to be enabled too. Any ideas to get around this issue and enable the default visible layers properly? Thanks a lot!
... View more
06-05-2014
07:43 PM
|
0
|
3
|
1927
|
|
POST
|
Not much of a workaround but if it helps anyone else, for the time being we just copied the definition queries to the description and tweaked our app to read it from there. Ideally don�??t want to have to manage the query in two spots though. Talked with a very helpful ESRI support person today and he is going to look into this and why that functionality was removed. Will update if I hear anything new.
... View more
05-12-2014
02:58 PM
|
0
|
0
|
1350
|
|
POST
|
OMG... so we just upgraded to 10.2.2 and a major piece of custom functionality in our WPF maps is not working because of this issue. We take the definition expression from one layer and append it to another using dynamic layers. Why would ESRI remove this, makes no sense? Why leave the object there if it is always going to be N/A? So ESRI refuses to release fixes and service packs for 10.1 (hence our primary reason to upgrade), but removes functionality from 10.2... I'm totally between a rock and a hard place now. Anyone hear any news on this issue? Any workaround to lookup a definition expression for a layer? Thanks much!
... View more
05-10-2014
03:26 PM
|
0
|
0
|
1350
|
|
POST
|
Great, thanks once again Dominique for the information!
... View more
01-14-2014
08:18 AM
|
0
|
0
|
2034
|
|
POST
|
Dominique to the rescue again! Thanks a lot. Thanks for confirming. Would be a nice future enhancement request... maybe something along the lines of all the properties can be nullable and if null then server defaults are used. Not sure what is required on the server side though, so probably not be quite that simple. We�??ll survive without that feature though :). Thanks for confirming. Would be a nice future enhancement request to get default LayerDrawingOptions out of the box, but no hurries from me on a feature like that, pretty easy to implement for oneself. Thanks much, that was the problem... scaling by 96/72 worked! A few additional questions if I may: So 96 is the screen DPI (which I can have C# get the current users default in case this is not), but may I ask what the 72 is? Now the labels almost match the same as the defaults, the only other thing that seems to be happening is the labels (in this case for a line) shift away from the line more than the defaults do. Setting the LabelClass.LabelPlacement like so: labelClass.LabelPlacement = (LabelPlacement)Enum.Parse(typeof(LabelPlacement), currentJSONLabelingInfo.labelPlacement.Replace("esriServer", "")); //Convert esriServerLinePlacementAboveAlong to LinePlacementAboveAlong And there are no offsets or anything. Not a huge issue... but not sure why they are shifting a bit if you happen to know? Attached an image for clarification. Thanks again for all the great help! If Dominique�??s boss is reading this, please give him a raise :).
... View more
01-13-2014
12:17 PM
|
0
|
0
|
2034
|
|
POST
|
Note that by setting LayerInfo.MinScale/MaxScale you can reduce the scale range defined at server side but you can NOT extend this scale range. Thanks so much for that info Dominique! That sounds exactly like what I am experiencing. Unfortunately that is exactly the functionality our users are asking for :(. The default scale range is set low, because there is lots of data in close proximity, but as they filter data out (turn off other sub-layers) they would like to have the option to increase the range. I suppose I could republish the service at a higher scale (or at all scales) and then set the scale lower after load. And I don't think a FeatureLayer will work great because there is a good amount of data and no labeling (when zoomed in). Hmm, bummer... If anyone can think of any other workarounds, I'd love to hear them. Thanks again Dominique!
... View more
01-10-2014
08:11 AM
|
0
|
0
|
574
|
|
POST
|
I am building a dialog to allow the users to change a layers labeling scale, all other LayerDrawingOptions should stay at the defaults. Unfortnatly from what I can tell, there is no way to just change the label's min/max scale without also defining most the other LayerDrawingOptions. Found I could skip resetting the renderer (leave it null) if I also dont reset "Opacity". First question, is there any easy way to just change the label min/max without having to specify all the other properties? Since there is not a nice method like CreateDynamicLayerInfosFromLayerInfos() for LayerDrawingOptions I am retrieving all the layer info manually from the servers (JSON). Second question, is there a built in way to get this info I am not seeing? I am taking this info to build out a complete LayerDrawingOptions with the defaults from the server, but the Font Size (even though set to the same font settings as the server) gets smaller. Third question, and most important, is this a bug? Why is it not rendering the same size? Thanks a lot for any help or info!
... View more
01-09-2014
09:31 AM
|
0
|
14
|
5147
|
|
POST
|
I'm building a little settings dialog window to allow users to dynamically change a few settings, mainly the layers scale and the layers labeling scale. This dialog is working fine for both the labeling min and max scales, and also working fine for the layers max scale. But changing the min scale has no effect though... Is this perhaps a known bug? I have checked over the code numberous times and the DynamicLayerInfos min scale is indeed changing. Perhaps there is something else I am missing? The Layers resolution is min = 0 and max = Infinity. Here is a code snipet: Layer.DynamicLayerInfos = Layer.CreateDynamicLayerInfosFromLayerInfos(); foreach (LayerInfo layerInfo in Layer.DynamicLayerInfos) { layerInfo.MaxScale = MaxLayerScale; layerInfo.MinScale = MinLayerScale; } Layer.Refresh(); The service layer does live inside a client side GroupLayer, and there are also group layers in the map service. But no settings are being set on the client Group and as the code snipet shows, I am setting the same min on all layers including the groups. Running the 10.2 API against a 10.1 server. Thanks a lot for any help or info!
... View more
01-08-2014
02:12 PM
|
0
|
2
|
2897
|
|
POST
|
I just came to ask about the same thing alina.taus did... AGEO was the only tool to build MobileWeb JSON queries. Since this JSON is practically undocumented, and a tool is much nicer than notepad anyway, are there going to be any replacement tools? Thanks!
... View more
12-14-2013
07:02 AM
|
0
|
0
|
1047
|
|
POST
|
Hmm, so I am trying to do this same thing using arcpy in an FME job but will not be loading up a map afterwards. Generating the connection (preferably only in memory) will be followed by tools like "Compress_management" and "DeleteRows_management" (working with a network dataset and FME is a bit limited there). Right now we have to do something like: arcpy.CreateArcSDEConnectionFile_management("c:\Temp", "Temp.sde", ...)
arcpy.env.workspace = "c:\Temp\Temp.sde"
arcpy.DeleteRows_management("FeatureClassName")
os.remove("c:\Temp\Temp.sde")
From the examples linked above, it seems this only works with a map but not necessarily other tools, is that correct? If I remove the line to set "arcpy.env.workspace" then it doesn�??t work anymore... maybe I am missing something? The primary reason for wanting this only in memory is because the connection that is being created is a database account with fairly high privileges, and if something were to happen where the os.remove didn�??t work that .sde file would be out there. We can protect this location behind AD I suppose, but would be nice to just not create it in the first place (auditors would like that). So that�??s my business reason for wanting a pure in memory only option, but that option doesn�??t exist today.
... View more
12-04-2013
08:52 AM
|
0
|
0
|
1461
|
|
POST
|
Thanks for the info dbroux... In trying this out I found some odd behavior, when I first set this as you said (offsets to half the image size) it seemed to be working. I really wanted an offset (not half the image size) for the image though so I decided to try it again and sure enough it had the issue. But then I set it back to what you said again and it was having the issue too. Strange. I cleaned the solution and rebuilt and then it was working ok again... hmmm. So I then put the offsets i truley wanted in and did a clean and rebuild and that seems to work fine too. Odd that cleaning the solution does this... hoping it doesnt switch back to the unwanted behavior at some point. But thanks a lot for the post and helping to get this working.
... View more
11-22-2013
06:51 AM
|
0
|
0
|
570
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-24-2023 10:43 AM | |
| 1 | 10-02-2023 02:23 PM | |
| 1 | 11-16-2016 02:05 PM | |
| 1 | 07-05-2017 09:30 AM | |
| 15 | 11-19-2010 08:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
08:25 PM
|