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

Setting the object style

Save as filesEdit on JSFiddle

YMapsML allows you to set the appearance of objects displayed on the map. The appearance of displayed objects is changed using styles. Styles let you set certain parameters for displaying geo objects and generate custom HTML representation using templates (see the example of using templates).

To define styles, use the repr:Style element, which is located in the repr:Representation element.

To specify which style to apply for displaying an object, set the ymaps:style element in the ymaps:GeoObject element. It should contain a link to a style that was defined in the repr:Style element. The style for a collection of geo objects can be set the same way in the ymaps:GeoObjectCollection element.

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