0

I want to set map scale manualy using ArcGIS Silverlight Api . I use silverlight api 3 and arcgis server 10 . I have 4 scale levels and I want to show the map in these scales. How can i set these scale using Silverlight Api ?

scale : 1:288895.27714400 1:144447.63857200 1:72223.81986000 1:36111.90964300

thanks for advance

2 Answers 2

1

Have you looked at the Scale Property (Map Options) class?

Gets or sets the map's scale. Optional but recommended for scale-dependent layers or reference scales set. Can be determined based on PrintParameter Map/Layers. Takes precedence over Extent. Output map is drawn at requested scale centered on the center of extent.

1
  • It just for printing not map scale
    – BBG_GIS
    Feb 19, 2014 at 12:06
0

First, would the Map.SnapToLevels property help?

Otherwise, more generally, look at the Map.Resolution property, the ground size of map pixels. You could force it to a value thusly: "Setting the Map.MaximumResolution and the Map.MinimumResolution to the same value essentially locks the Map to a specific scale; meaning that you can only Pan around". Maybe Map.ZoomToResolution() would accomplish that too.

So use your Map.Width to find the Resolution at which it gives you the desired scale. I think you have to assume a DPI though. If I'm not too arithmetically challenged, and assuming a planar map:

(width/dpi)/(width*resolution)* = scale. Just flip that around to solve for Resolution.

*also including whatever units conversions from inches to map units.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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