Overview of YMapsML

YMapsML is an XML language intended for describing and displaying various geographical objects in the Yandex.Maps service.

YMapsML is based on the XML standard and is an extension of the GML standard.

The root element of a YMapsML document is ymaps:ymaps. The attributes for this element define the XML namespace and the XSD schema being used.

The ymaps:ymaps element, in turn, can contain several tags that serve as containers for various data or groups of data that are displayed on a map.

It is a container for the attr:Source tag.
Contains information about who provided the information presented in the YMapsML document.
It is a container for the repr:View, repr:Style, and repr:Template tags.
Intended for creating the initial state of a map. Use it to set the map center, type, and starting zoom level. The repr:View element can only occur once in a YMapsML document.
Defines styles of objects that are displayed on the map. In particular, you can use styles to describe how placemarks, lines, and other objects will look on the map. A YMapsML document can have any number of repr:Style elements.
Intended for defining templates for the HTML layout of various map objects. A YMapsML document can have any number of repr:Template elements.
A container for descriptions of the objects placed on a map. You can use this element to set shared properties, such as styles, for a set of geographical objects. The ymaps:GeoObjectCollection element can contain nested ymaps:GeoObjectCollection elements, but it can only be present once in the ymaps:ymaps element.

In general terms, a YMapsML document looks like this:

<?xml version="1.0" encoding="utf-8"?>
<ymaps:ymaps xmlns:ymaps="https://maps.yandex.ru/ymaps/1.x"
                    <gml:lowerCorner>32.805985 39.915474</gml:lowerCorner>
                    <gml:upperCorner>32.858513 39.865093</gml:upperCorner>

        <repr:Style gml:id="customStyle">
                <repr:size x="26" y="46"/>
                <repr:offset x="-22" y="-46"/>
                    <repr:size x="25" y="23"/>
                    <repr:offset x="0" y="-25"/>



        <repr:Template gml:id="customTemplate">
        <Source id="source">
                <name>Source name</name>
                    <gml:pos>32.830618 39.889957</gml:pos>

                    <gml:pos>32.823752 39.894651</gml:pos>
                    <gml:pos>32.824009 39.883213</gml:pos>
                    <gml:pos>32.835597 39.882486</gml:pos>
                    <gml:pos>32.834395 39.895775</gml:pos>
                    <gml:pos>32.823752 39.894651</gml:pos>