I'm looking for some information on Scale Dependent Symbology for FeatureLayers. For example, as the user zooms in or out, the symbol size is drawn relative to the view scale and it basically gets bigger or smaller in these cases. Now, when I load a map and zoom in or out, the symbol stays the same size on the map.
Is it possible to setup this type of scale dependent symbol rendering?
I tried that setup and of course the symbology changes as expected in Pro.
However, after creating a Mobile Map Package from it and loading the Map Package into ArcGIS Runtime, the symbol does not change. It just sticks to one symbol, regardless of the map's scale.
Am I missing anything?
I'm seeing the same thing Jens is seeing - when I set the Reference Scale of my Map in ArcGIS Pro, the symbols are sized based on the reference scale I select in ArcGIS Pro. However when I create a Mobile Map Package, the Esri Runtime for .NET (v100.2) does not draw the symbols the same way based on the view scale - they are always drawn the same size regardless of what view scale the map is at.
Any ideas on what we are missing?
This is somewhat of an important feature for us, based on the type of data we are using. The map gets very cluttered at lower view scales if the symbols are not sized based on the view scale.
Support for reference scale is a high priority feature for ArcGIS Runtime and is on the roadmap for a future release.
It may be possible to emulate this behavior by handling the navigation completed event then modifying the symbol size of graphics/features based on the current view scale. But that could become a relatively expensive operation depending on the frequency of navigation and the number of features/graphics.
Thanks a lot for the response - I had a feeling this wasn't supported yet. I think it is an important feature, especially for your users and developers in the electric and gas utility community. It will be difficult to use the maps with the Esri Runtime in these industries until scale dependent symbology is supported.
To reiterate Michael Branscomb above, we agree that Reference Scale is important. Our goal is to introduce support for Reference Scale in the Q1/Q2 2019 Runtime release but of course schedules can change and functionality can slip (though we're working hard to hit that release).
In the meantime, some customers have had success with a partial workaround. The gist of it is that you define a symbol's size when authoring the map using an Arcade expression along the lines of (1/$view.scale)*1000000.
Some notes on this approach:
Hope this helps!
I really appreciate this information, it helps us plan out some direction for our development with the Runtime. In the meantime, would you be able to provide a code example we could use to try the Arcade expression? I'm wondering if we'd be able to make the code generic enough for us to use with all of our customers, or if we'd need to develop some type of configuration options by layer to set the scaling in the arcade expression correctly; some of our customers have 75 or 80 layers in their MMPKs.
Here's a shot of what that currently looks like zoomed out a few levels - all of these features/symbols need to be displayed at this level. As you zoom in, the symbols are scaled correctly and it looks very nice, maybe at a 1:50 or 1:100. But when you get out to around 1:400 it really looks bad. It's just hard to try to convince one of our electric utility customers to use this type of map at this point. So, we've been soft pedaling the Runtime development efforts until this improves.
Not sure I have code available. At the moment, we don't expose the right properties on the symbol objects to modify the Arcade expression (deeper symbology API is coming in the next couple of releases too - you can imagine a lot of this is interrelated).
In the example I've seen, this Arcade expression is created in ArcGIS Pro to drive the symbol size:
As you mention, it's not an ideal workflow to manage with a lot of layers. I'm not familiar with the Pro SDK, but I imagine you should be able to write something to manage this, or manage it with some Python code. However, as a proof of concept this should at least let you figure out if this workaround will work for you.
Alternatively, you can take the symbol definition JSON that this creates when the MMPK is generated, and modify that in the runtime to update as necessary, using AGSSymbol.fromJSON() to create a new symbol to apply to the layer. That's the code I have to work out how to dig up.
Thank you very much for this information - I just had an opportunity to do a little more testing with this approach and I have to say it works really well. With just a little effort I was able to setup several layers. However, I could not find a way to apply this same approach to text size - is there currently a way to use an Arcade expression to size the text based on view scale?
Here's what I'm seeing now - as I zoom out, the text basically covers everything on the map: