hide

Hides the layer, if visible.

<button class="k-button k-button-lg k-button-solid-primary" id="hide">Hide Layer</button>
<div id="map"></div>
<script>
  $("#hide").on("click", function() {
    let map = $("#map").data("kendoMap");
    let layer = map.layers[0];

    // Hide the first layer of the map
    layer.hide();
  });

  function createMap() {
    $("#map").kendoMap({
      center: [45, 45],
      minZoom: 3,
      zoom: 4,
      wraparound: false,
      layers: [
        {
          type: "tile",
          urlTemplate: "https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
          subdomains: ["a", "b", "c"],
          attribution: "&copy; <a href='https://osm.org/copyright'>OpenStreetMap contributors</a>"
        }
      ]
    });
  }

  $(document).ready(createMap);
</script>
In this article