SetVisible

(Tlayer.SetVisible Method)

Sets the layer visibility by the given boolean argument-visible.
public SetVisible(Visible):Void

Parameters

  • Visible : Boolean - Set the layer visibility by given boolean argument Visible.
  • Returns

  • Void
  • Example

    The following example shows how to set the visibility of the layer.
    <div id="mapContainer"  style="width: 640px; height: 400px;"></div>
    <script type="text/javascript">
        var map0 = new TMap(mapContainer, 25.7590256665386, -80.3738769902151, 15, mapLoaded, 1, true, "", "hybrid");
    
       
        function mapLoaded() {
            var layer0=map0.AddLayer();
            var marker0=layer0.AddMarker(25.759025666538, -80.3708769902151, "Text Marker0");
            layer0.SetVisible(True);
        }
    </script>
        

    See example

    Adding layers