Aller au contenu principal

<map-properties>

L’élément <map-properties> est l’enfant de l’élément <map-feature>. Il sert à définir le contenu de la fenêtre contextuelle associée à une entité donnée.

Un élément <map-properties> peut contenir un élément HTML pour décrire le contenu de l’entité.


Exemples

Tableau des propriétés

Dans l’exemple suivant, la fenêtre contextuelle s’affiche sous forme de tableau HTML.

<mapml-viewer projection="OSMTILE" zoom="12" lat="45.42" lon="-75.70">
<layer- label="OpenStreetMap" src="../data/osm.mapml" checked></layer->
<layer- label="Ottawa" checked>
<map-meta name="projection" content="OSMTILE"></map-meta>
<map-meta name="cs" content="gcrs"></map-meta>
<map-feature>
<map-featurecaption>Ottawa</map-featurecaption>
<map-geometry>
<map-point class="ottawa">
<map-coordinates>-75.697193 45.421530</map-coordinates>
</map-point>
</map-geometry>
<map-properties>
<table>
<thead>
<tr>
<th role="columnheader" scope="col">Property name</th>
<th role="columnheader" scope="col">Property value</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Name</th>
<td itemprop="amenity">Ottawa</td>
</tr>
<tr>
<th scope="row">Type</th>
<td itemprop="name">Ville</td>
</tr>
<tr>
<th scope="row">Site Web</th>
<td itemprop="website"><a href="https://ottawa.ca/" target="_blank">Ottawa</a></td>
</tr>
</tbody>
</table>
</map-properties>
</map-feature>
</layer->
</mapml-viewer>

Spécifications

Spécification
Élément MapML « properties »