Version:
Popular examples
Map
Geo objects
Balloon and hint
Controls
Hotspots
Regions
Clustering
GeoQuery
Behaviors and events
Search on a map
Traffic
User's location
Routing
YMapsML
GeoXML
ObjectManager
Modular system
Panoramas
External modules

Adding buttons to the map

Save as filesEdit on JSFiddle

The control.Button class lets you create buttons and add them to the map via control.Manager.

A button may have 3 different appearances, depending on the map size and the number of other controls on the map. On a small map, the button displays only the icon; on a medium-size map, the text of the button is shown; on a large map, the button icon is displayed with the text. You can lock the button in any size or you can specify only the icon or text only.

By default, maximum button width is 90 pixels. If your button contains a long text, you should set it to the desired maximum size using the maxWidth option.