hide

Hides the layer, if visible.

Example

<div id="map"></div>
<script>
    $("#map").kendoMap({
        layers: [{
            type: "marker",
            dataSource: [
                { latlng: [42.3601, -71.0589], name: "Boston" },
                { latlng: [40.7128, -74.0060], name: "New York" }
            ],
            locationField: "latlng"
        }]
    });

    var map = $("#map").data("kendoMap");
    var markerLayer = map.layers[0];
    
    // Hide the marker layer
    markerLayer.hide();
    console.log("Marker layer is now hidden");
    
    // Show it again after 2 seconds
    setTimeout(() => {
        markerLayer.show();
        console.log("Marker layer is now visible again");
    }, 2000);
</script>
In this article
hide
Not finding the help you need?
Contact Support