Control for setting MapScale

3340
3
11-26-2014 11:21 PM
AnatoliiTerentiev
Occasional Contributor III

Dear Gurus!

I would like to implement MapScale control as it done in arcgis Desktop.

I put on View ComboBox , bind SelectedValue of ComboBox  to SelectedMapScale in MapViewModel.

In arcObjects I did this as follows:

axMapControl1.MapScale = SelectedMapScale ;

How to set the desired map scale with  arcgis API for WPF?

0 Kudos
3 Replies
AnatoliiTerentiev
Occasional Contributor III

I found experimentally approximate coefficient connecting resolution and MapScale. Thus, when SelectedMapScale changed  I do the following operations:

Map.ZoomToResolution( SelectedMapScale * 0.0002644, mapPoint);

0 Kudos
DominiqueBroux
Esri Frequent Contributor

There is a ScaleLine control in the toolkit which might help.

There is also a scaleline sample showing how the control can be customized.

AnatoliiTerentiev
Occasional Contributor III

Thank you, Dominique!

0 Kudos