AddLayer

(TMap.AddLayer Method)

Adds a layer to the map, which is the container of markers. It creates an object of TLayer.
public AddLayer():Object

Parameters

  • void

    Returns

  • TLayer : Object - Return a layer to the map,which is the container of markers.
  • Example

    The following example shows how to add layer on the current map view.
    <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();
        }
        
    </script>
        

    See also

  • RemoveLayer()
  • class TLayer

    See example

    Adding a layer and placing a marker