Skip to main content

<map-datalist>

The <map-datalist> element is an extension of HTML <datalist>. It is a child of the <map-extent> element and is used by the list attribute of the <map-input> element by linking the id of <map-datalist>:

<map-input name="s" type="hidden" shard="true" list="servers"></map-input>
<map-datalist id="servers">
<map-option value="a"></map-option>
<map-option value="b"></map-option>
<map-option value="c"></map-option>
</map-datalist>

The <map-datalist> is used alongside the shard attribute of <map-input>. It can list a set of values that will be used in a round-robin fashion for template variable substitution. This is useful for domain sharding to increase parallelism of tile requests. Read more about it here.

The <map-datalist> element contains one or more <map-option> elements.

Attributes

id

Sets the id of the <map-datalist> element. This id is used by the list attribute of the <map-input> element, allowing it to link to the datalist.

Click to view an example of the link between <map-datalist> and <map-input>
<map-input name="s" type="hidden" shard="true" list="servers"></map-input>
<map-datalist id="servers">
<map-option value="a"></map-option>
<map-option value="b"></map-option>
<map-option value="c"></map-option>
</map-datalist>

Child Elements

<map-option>

This element contains the values for the datalist. A <map-datalist> element can contain one or more <map-option> elements.

Attributes

  • value
    • This allows you to set the value of the the datalist option.

Specifications

Specification
MapML datalist element
HTML datalist element