Zoom in/out by drawing a rectangle

5337
4
04-09-2014 11:44 AM
Labels (1)
ducksunlimited
New Contributor
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
Occasional Contributor III
Hello mate!!!

interesting proposal....I think, if you get the geometry of the rectangle, you could perform an myMap.ZoomTo() call.
0 Kudos
AnttiKajanus1
Occasional Contributor III
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
New Contributor
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