How can I set the maximum scale for a layer? Sometimes the layer is not visible (it disappear), when the map scale is >= 1:250000. I'd like to set it on max 1:125000.

This code does not work:

    Map.Layers["LB"].MaximumResolution = 125000.0;

I'm developing in visual studio with C# (WPF)


MaximumResolution is not a property of any object in ArcObjects, did you just make that up?

If you want to set the maximum display scale of a layer you need to be using MaximumScale of the ILayer interface.

  • You can find MaximumResolution in ESRI.ArcGIS.Client. There is: public double MinimumResolution { get; set; }
    – minimen
    Sep 2 '14 at 6:22
  • Interesting when I searched for this property in the arcobjects api it did not find it. But you are right it is in the silverlight Web api. Are you creating some sort of Web application?
    – Hornbydd
    Sep 2 '14 at 8:13
  • I'm working on a desktop application
    – minimen
    Sep 2 '14 at 9:09
  • Well that may be your problem, although I have never worked WPF. You would typically get a handle on a layer via IMap and change the properties of the layer, both these interfaces come from the ESRI.ArcGIS.Carto namespace not ESRI.ArcGIS.Client
    – Hornbydd
    Sep 2 '14 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.