{{ if or (not .Parent) (not (eq .Parent.Name "leaflet-map")) }} {{ errorf "%s: cannot be used outside leaflet-map: %s" .Name .Position }} {{ end }} {{ if not (isset .Params "id") }} {{ errorf "%s: missing 'id' parameter: %s" .Name .Position }} {{ end }} {{ $uniqueMapId := .Parent.Ordinal | safeJS }} {{ $id := .Get "id" }}