Skip to content

ZoomControl

Type class

Creates the controls for the map to change the zoom level and pan around the map.

Example

```js var map = AmCharts.makeChart("mapdiv",{ ... "zoomControl": { "zoomControlEnabled": true } });```

Sources

This information about ZoomControl is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

ZoomControl does not extend any other symbol.

ZoomControl is not extended by any other symbol.

Properties

bottom

Type number

Distance from left side of map container to the zoom control.

buttonBorderAlpha

Type numberDefault 0.1

Button border opacity.

buttonBorderColor

Type colorDefault #000000

Color of button borders.

buttonBorderThickness

Type numberDefault 1

Button border thickness.

buttonColorHover

Type colorDefault #FF0000

Button roll-over color.

buttonCornerRadius

Type numberDefault 2

Button corner radius.

buttonFillAlpha

Type numberDefault 1

Button fill opacity.

buttonFillColor

Type colorDefault #FFFFFF

Button fill color.

buttonIconAlpha

Type numberDefault 1

Opacity of button icons.

buttonIconColor

Type colorDefault #000000

Button icon color.

buttonRollOverColor

Type colorDefault #DADADA

Button roll-over color.

buttonSize

Type numberDefault 31

Size of buttons.

draggerAlpha

Type numberDefault 0

Opacity of a dragger.

gridAlpha

Type numberDefault 0

Opacity of zoom-grid.

gridBackgroundAlpha

Type numberDefault 0

Opacity of background under zoom-grid.

gridBackgroundColor

Type colorDefault #000000

Color of background under zoom-grid.

gridColor

Type colorDefault #000000

Grid color.

gridHeight

Type numberDefault 5

Zoom grid height in pixels.

homeButtonEnabled

Type booleanDefault true

Specifies if home button is visible or not.

homeIconColor

Type colorDefault #FFFFFF

Home icon color.

homeIconFile

Type stringDefault homeIcon.gif

File name of home icon. You can also find homeIconWhite.gif in the images folder, or you can create your own image.

Important: This setting is ignored by default because Map uses SVG paths for all controls. To enable this feature set map's ZoomControl.svgIcons to false.

iconSize

Type numberDefault 11

Size of icons. You might need to change size of icon gif files if you change this property.

left

Type numberDefault 10

Distance from left side of map container to the zoom control.

maxZoomLevel

Type numberDefault 64

Max zoom level.

minZoomLevel

Type numberDefault 1

Min zoom level.

panControlEnabled

Type booleanDefault false

Specifies if pan control is enabled.

panStepSize

Type numberDefault 0.1

Specifies by what part of a map container width/height the map will be moved when user clicks on pan arrows.

right

Type number

Distance from right side of map container to the zoom control.

roundButtons

Type booleanDefault true

Specifies if buttons should be round or not (rectangular).

top

Type numberDefault 10

Distance from top of map container to the zoom control.

zoomControlEnabled

Type booleanDefault true

Specifies if zoom control is enabled.

zoomFactor

Type numberDefault 2

zoomFactor is a number by which current scale will be multiplied when user clicks on zoom in button or divided when user clicks on zoom-out button.

Methods

ZoomControl does not have any methods.

Events

ZoomControl does not have any events.