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

Placemark and balloon panel

Save as filesEdit on JSFiddle

In this example, a placemark is added to the map that, when clicked, opens a balloon panel with the specified content.

To set the placemark style from a set of built-in styles, use the preset option. The API has five preset styles for placemarks (the corresponding keys are shown in parentheses):

  • placemarks with text ('islands#icon');
  • placemarks that stretch to fit the text ('islands#stretchyIcon');
  • placemarks with a dot in the center ('islands#dotIcon');
  • placemarks in the form of circles ('islands#circleIcon');
  • placemarks in the form of circles with a dot in the center ('islands#circleDotIcon').

For each style there are 16 colors. The API allows you to also specify custom colors for placemarks for all styles, except 'islands#stretchyIcon'. For information on how to set custom colors for placemarks, see the following example.

Пишете на JavaScript? У нас есть вакансии
Mon Oct 31 2022 13:07:25 GMT+0300 (Moscow Standard Time)