SetContent

(TMarker.SetContent Method)

Sets the content to be shown by the marker specified by the string ‘strValue’.
public SetContent(strValue):Void

Parameters

  • strValue : String - Set the content to be shown by the marker.
  • Returns

  • Void
  • Example

    The following example creates a map, adds a layer , and a marker with the text "Text Marker0". It then changes the text on the marker via the SetContent function.
    <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.SetContent("new text content");
        }
    </script>
        

    See also

  • SetLabel()