SMK Usage Guide

A versatile and lightweight toolkit for building a simple web map.

This project is maintained by bcgov

SMK / Initialization

Initializing the Container Selector

This value is a selector that identifies the element that will contain the map. This selector must match exactly one element, otherwise a fatal error occurs. Usually this will be an id selector like "#smk-map-frame".

Note

If the smk-container-sel attribute is used with the <script> element, then SMK CANNOT be initialized with SMK.INIT (an exception will be thrown).

smk-container-sel Attribute

Required

Used by the SMK <script> element. Sets the container element selector.

<script src="smk/dist/smk.js"
    smk-container-sel="#smk-map-frame"
></script>

containerSel Option

Required

Used by SMK.INIT. Sets the container element selector.

SMK.INIT( {
    containerSel: '#smk-map-frame'
} )