AddMarker

(TMap.AddMarker Method)

Adds a normal TerraFly marker on the layer. The marker would be located at the given geographical position (arguments one and two) with given label(argument three).
public AddMarker(latitude, longitude, label):Void

Parameters

  • latitude : Number - Set the latitude of the geographical position on the layer where the Marker added.
  • longitude : Number - Set the longtitude of the geographical position on the layer where the Marker added.
  • label : String - Set the label on the marker.
  • Returns

  • Void
  • Example

    The following example creates a map and changes its size from 640 by 400 pixels to 800 by 600 pixels.
    <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 Marker");
        }
    </script>
        

    See also

  • RemoveMarker()
  • GetMarkers()

    See example

    Adding a layer and placing a marker