Select to view content in your preferred language

Zoom in/out by drawing a rectangle

5728
4
04-09-2014 11:44 AM
Labels (1)
ducksunlimited
Deactivated User
Hi All,

Does the Runtime SDk support a draw object like what the web API does? So basically click the zoom in/out tool, allowing drawing a rectangle on a map and zoom in/out to the extent. I am looking at the samples but didn't see it.

Thanks,
Chris
0 Kudos
4 Replies
Cristian_Galindo
Frequent Contributor
Hello mate!!!

interesting proposal....I think, if you get the geometry of the rectangle, you could perform an myMap.ZoomTo() call.
0 Kudos
ducksunlimited
Deactivated User
0 Kudos
AnttiKajanus1
Deactivated User
Just confirming that you know the shortcuts for navigation tools that are provided out of the box: If those are suitable for your scenario you could save some time to use those instead.


Change the extent at runtime

A set of pre-defined keyboard and mouse shortcuts are enabled on a Map control by default. The following table lists the combination of key and mouse actions and the map actions that they trigger:

[TABLE="class: table, width: 1087"]Press left, right, up, down arrowNonePan in the direction of the arrow key pressed.+/-NoneZoom in (+) or zoom out (-) one zoom factor. The zoom factor is defined by the Map.ZoomFactor property.NoneLeft mouse button double clickZoom in one zoom factor.NoneLeft mouse button click, then hold and dragPan the map (default map action).Shift, press and holdLeft mouse button click, then hold and dragDefine an extent to zoom in.Shift+Ctrl, press and holdLeft mouse button click, then hold and dragDefine an extent to zoom out.NoneScroll wheel forward/backwardZoom in (forward), zoom out (backward).
[/TABLE]



[ATTACH=CONFIG]32997[/ATTACH]

http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Navigating_the_map/01700000008m...
0 Kudos
ducksunlimited
Deactivated User
Thanks Antti. but seems the shortcuts don't work well with touch screens like tablets without an external keyboards.



Just confirming that you know the shortcuts for navigation tools that are provided out of the box: If those are suitable for your scenario you could save some time to use those instead.


Change the extent at runtime

A set of pre-defined keyboard and mouse shortcuts are enabled on a Map control by default. The following table lists the combination of key and mouse actions and the map actions that they trigger:

[TABLE="class: table, width: 1087"]Press left, right, up, down arrowNonePan in the direction of the arrow key pressed.+/-NoneZoom in (+) or zoom out (-) one zoom factor. The zoom factor is defined by the Map.ZoomFactor property.NoneLeft mouse button double clickZoom in one zoom factor.NoneLeft mouse button click, then hold and dragPan the map (default map action).Shift, press and holdLeft mouse button click, then hold and dragDefine an extent to zoom in.Shift+Ctrl, press and holdLeft mouse button click, then hold and dragDefine an extent to zoom out.NoneScroll wheel forward/backwardZoom in (forward), zoom out (backward).
[/TABLE]



[ATTACH=CONFIG]32997[/ATTACH]

http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Navigating_the_map/01700000008m...
0 Kudos