The template body.

This is an HTML code with the following inserts:


When creating an HTML layout for a specific map object, such inserts are replaced with data from the object. For example, the template body might look like this:

<div><h3>$[name|no name specified]</h3><span>$[description|no description]</span></div>

When this template is applied, the $[name|no name specified] field will be replaced by the name field value of the object the template is used for.

If the name field is not set for an object, the default value will be substituted. Similarly for $[description|no description].

When describing geographic objects with YMapsML, you can use such tags as gml: name, gml: description, and gml: metaDataProperty for storage and subsequent display of data.

For security reasons, HTML markup can only be stored in the gml: description tag. All other tags must contain text only, and HTML markup in them is shown on the screen.

Contained by:



YMapsML document that describes an icon placemark template:

<repr:Template gml:id="myIconTemplate">
          <div style="font-size:15px;"><div><u>Name</u>: $[name]</div>
          <div><u>Description</u>: $[description]</div> </div>
          <div> <img src=""></div>

Using this template, you can define a style:

<repr:Style gml:id="myStyle">
      <repr:size x="56" y="56"/>

And apply it to a placemark:

   <gml:description> The deepest lake on the planet Earth.<br/>The largest natural freshwater reservoir.</gml:description>
      <gml:pos>107.7 53.08</gml:pos>