ShowInfoWindow

(TMarker.ShowInfoWindow Method)

Displays a simple info window without the tabs which can be set in a marker’s click event. As this is assigned to the marker, there is no need for providing the location (latitude and longitude). The window label text is given by string myLabel and the window content text is given by the string myContent. The width, height and border of the info window can be specified using the string styleStr.
public ShowInfoWindow(styleStr, myLabel, myContent):Void

Parameters

  • styleStr : String - Set the width,height and border of the info window.
  • myLabel : String - Set the window label text.
  • myContent : String - Set the window content text.
  • Returns

  • Void
  • Example

    The following example creates a map, adds a layer , and a marker with the text "Text Marker0". It then opens an info window from that marker.
    <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.ShowInfoWindow("width=240;height=100", "Normal Terrafly Marker", "Hello, This is a Text Marker.");
            
    </script>
        

    See also

  • ShowInfoWindowTabs()