I'm not sure how to change the math for the example in http://forums.esri.com/Thread.asp?c=213&f=2455&t=285205 for NM State Plane (2903) and Units = ersiFeet. Specifically what do I use instead of 39.37 (inches per meter)? Should this be 12 (inches per foot)? Also what should use instead of mapunitInMeters (see snippit below)?
private void zoomToScaleCombo_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (MyMap == null) return; double dpi = 96; //Set to resolution of your screen double scale = double.Parse((e.AddedItems[0] as ComboBoxItem).Tag.ToString()); double mapunitInMeters = 111319.5; //size of one degree at Equator. Change if you are using a projection with a different unit than degrees double newRes = scale / (dpi * 39.37 * mapunitInMeters); MyMap.ZoomToResolution(newRes); }
Would this logic be (12 inch = 1 foot and since the mapunit is in feet this value would be 1)?
I just wanted to make sure I had the formula right for my projection (NM State Plane) and Feet based units. I guess the project really doesn't matter as long as the units are in feet.