SetLabel

(TMarker.SetLabel Method)

Sets the label to the given new value.
public SetLabel(strLabel):Void

Parameters

  • strLabel : String - Set the label to the given new value.
  • Returns

  • Void
  • Example

    The following example creates a map, adds a layer , and a marker with the text "Text Marker0". It then sets the label of marker0 to "New Label".
    <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");
            marker0.SetLabel("New Label");
        }
    </script>
        

    See also

  • SetContent()