AddCustomizedButton

(TMap.AddCustomizedButton Method)

Adds a customized (user defined) button on the map whose location on the map is specified by the buttonX and buttonY (arguments one and two) and the icon of the customized button is specified by the buttonIconURL (argument three) of the function. The parameter buttonIconURL should point to the url of the customized button to be placed on the map.
public AddCustomizedButton(buttonX, buttonY, buttonIconURL):Object

Parameters

  • buttonX : Number - Set the x Coordinates in pixel of the customized button position in the screen.
  • buttonY : Number - Set the y Coordinates in pixel of the customized button position in the screen.
  • buttonIconURL : Object - Specify the icon of the customized button.It point to the icon location's url.
  • Returns

  • Object - Returns the customized button that has been added to the Tmap object.

    Example

    The following example shows how to add customized button on curent 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, mapInit, 1, true, "", "hybrid");
       
        function mapInit() {
            button=map0.AddCustomizedButton(24, 8,"images/example_15/button.png");
        }
    </script>
        

    See also

  • class TButton