Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
Are you willing to assume a dpi for your display? What if someone is using a projector? –  Kirk Kuykendall Jun 20 '11 at 21:00
    
Yes, I'd be willing to assume a DPI. –  Seth P. Jun 20 '11 at 21:05

2 Answers 2

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 _
}
share|improve this answer
LayerInfo mfinfo = (map1.Layers["MFStock"] as ArcGISDynamicMapServiceLayer).Layers[1] as LayerInfo;
        mfinfo.MaxScale = 100000;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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