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
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.
-
It just for printing not map scaleBBG_GIS– BBG_GIS2014年02月19日 12:06:54 +00:00Commented Feb 19, 2014 at 12:06
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.
Explore related questions
See similar questions with these tags.