SetMarkerStyle

(TMarker.SetMarkerStyle Method)

Set the style of marker which this method is applied to.
public SetMarkerStyle(strStyle):Void

Parameters

  • strStyle : String - A string that specifies the style of the markers. It can only have the following attributes: (seperate each attribute with ; except for the last one)
         a. MARKER_SIZE : Number - Set the size of the marker.
         b. MARKER_COLOR : Hex Color Code - Set the marker to this color.
         c. MARKER_ALPHA : Number - Set the alpha value for the marker.
         d. BORDER_WIDTH : Number - Set the border width of the marker.
         e. BORDER_COLOR : Hex Color Code - Set the marker border to this color.
         f. BORDER_ALPHA : Number - Set the marker border to this alpha.
         g. FONT : String - Set the font of this marker.
         h. FONT_COLOR : Hex Color Code - Set the text of the marker to this color.
         i. FONT_ALPHA : Number - Set the alpha of the text of the markers to this value.

    Returns

  • Void
  • Example

    The following example shows how to set a marker's style.
    <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.SetMarkerStyle("MARKER_SIZE=20;MARKER_COLOR=0xFFFFFF;FONT=Times New Roman;FONT_COLOR=0xCCCCCC");
        }
    </script>
        

    See also

  • AddMarker()