How-to add Identify

Identify is supported on wms, mapserver, wfs, mapserver-wfs, and ags-vector map-source types.

TL;DR Add a <template name="identify"> to the <layer ...> which needs identify.

The Firestations layer

This how-to references the firestations source and fire_stations layer. For more information on setting those up in your local demo, read the How-to add a layer guide.

Adding identify to Firestations

<map-source name="firestations" type="mapserver">
    <file>./demo/firestations/firestations.map</file>
    <layer name="fire_stations">
        <template name="identify"><![CDATA[
        <div class="result-item">
            <div class="result-title">
            Firestation
            </div>
            <b>Station City:</b> {{ properties.Dak_GIS__4 }}<br>
            <b>Station Number:</b> {{ properties.Dak_GIS__5 }}<br>
        </div>
        ]]></template>
    </layer>
</map-source>