shift

type String
default "default"
init
$( map selector ).geomap( { shift: "default" } );
get
var shift = $( map selector ).geomap( "option", "shift" );
set
$( map selector ).geomap( "option", "shift", "off" );

The shift option determines how the shift key affects the map during drag operations in different modes. There are currently four values: zoom, dragBox, default, and off.

zoom

When shift is set to zoom and a user holds the shift key before holding the mouse button down, the map temporarily switches to zoom mode. In this state the user can perform a marquee zoom by clicking and holding one point and dragging the mouse cursor. A box will form. When the user lets go of the mouse, the map will zoom to the closest approximation of the bbox of the drawn shape.

dragBox

When shift is set to dragBox and a user holds the shift key before holding the mouse button down, the map temporarily switches to dragBox mode. In this state the user can click and hold one point and then drag the mouse cursor. A box will form. When the user lets go of the mouse, jQuery Geo will trigger a shape event passing a GeoJSON Polygon representation of the dragged bbox as the geo argument. The Polygon object also has the GeoJSON the bbox property.

default

When shift is set to default, it behaves like dragBox when the mode option is dragBox and behaves like zoom in all other modes. For example, a shift-drag in pan mode will temporarily switch the map to zoom mode (thus zooming the map and triggering a bboxchange event) while a shift-drag in dragBox mode will stay in dragBox mode (thus triggering a shape event).

off

When shift is set to off, the shift key is ignored. For example, if mode is pan and the user holds the shift key and begins to drag, the map will pan as normal.

static maps

When the map's mode option is set to static, the map ignores all user interaction so the shift key is also ignored.