1

Is there a way to translating between resolution and scale in the ArcGIS Silverlight API?

I am dynamically adding a Feature Layer to my map which should have a Min Scale value of 10,000. The feature layer object has a setting for Minimum Resolution, but nothing for Scale values.

Does anyone know how I can set the Feature Layer to only show data below that scale?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jun 20, 2011 at 20:54
2
  • Are you willing to assume a dpi for your display? What if someone is using a projector? Commented Jun 20, 2011 at 21:00
  • Yes, I'd be willing to assume a DPI. Commented Jun 20, 2011 at 21:05

2 Answers 2

1

In your code-behind, you can get your Map's scale and resolution, and divide them to get the constant between them. Then, just set the minimum resolution for the FeatureLayer, based on that.

vb.net:

'assuming variable MyMap as ESRI.ArcGIS.Client.Map
Dim myFeatureLayer as New FeatureLayer() With { _
 ... 
 .MinimumResolution = 10000 * MyMap.Scale / MyMap.Resolution _
}
answered Oct 22, 2012 at 23:42
0
LayerInfo mfinfo = (map1.Layers["MFStock"] as ArcGISDynamicMapServiceLayer).Layers[1] as LayerInfo;
 mfinfo.MaxScale = 100000;
answered Apr 6, 2013 at 16:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.