SetSize

(TMap.SetSize Method)

Specifies the width and height of the map to be displayed.
public SetSize(width, height):Void

Parameters

  • width : Number - The width of map in pixels.
  • height : Number - The height of map in pixels.
  • 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, mapInit, 1, true, "", "hybrid");
       
        function mapInit() {
            map0.SetSize(800, 600);
        }
    </script>
        

    See example

    Changing the size of the map