type | String |
---|---|
default | "default" |
init |
|
get |
|
set |
|
The shift option determines how the shift key affects the map during drag operations in different modes. There are currently four values: default, zoom, dragBox, and off. However, default is currently the same as zoom.
When shift is set to default or zoom and a user holds the shift key before holding the mouse button down, the map temporarilly 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.
When mode is dragBox, the shift key will still switch to zoom mode. Dragging will form a box either way but if the shift key was down when the user started, the map will zoom.
When shift is set to dragBox and a user holds the shift key before holding the mouse button down, the map temporarilly 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.
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.
When the map's mode option is set to static, the map ignores all user interaction so the shift key is also ignored.