TMap

(TMap.TMap Method)

Creates a TerraFly® Map inside a HTML container given by the first argument, which is typically a DIV element. The (latitude, longitude) of the map center coordinates are given by the second and third argument. The created map is shown in a resolution which is given by the fourth argument-level. Each given level is mapped to a specific resolution according to the ZoomLevel-Resolution table. The resolution value is in meters per pixel.
TMap(container,latitude,longitude,level,onLoadCallBackFunction,bufferSize,isAutolnstall, mapEngine, initMapType/*optional*/):TMap

Parameters

  • container : Object - The div container object in which the Tmap displayed on the webpage.
  • latitude : Number - The latitude of the map.
  • longitude : Number - The logitude of the map.
  • level : Number - The zoom level of the Resolution for desplaying the map.
  • callbackfunction : object - The callback function which provides a mechanism that could notify you that the map is ready for you to begin the other API operations
  • bufferSize : Number - The buffer size,default value is zero.
  • isAutolnstall : Boolean - Whether or not the map auto installs.
  • mapEngine : String - The engine you want to build the Tmap object from.(leave string blank for default)
  • initMapType : String - The map type that the Tmap object starts as.
  • Returns

  • Instance : Object - The Tmap object.
  • Example

    The following example creates a map object.
    <div id="mapContainer"  style="width: 640px; height: 400px;"></div>
    <script type="text/javascript">
        var map0 = new TMap(mapContainer, 25.7590256665386, -80.3738769902151, 15, "", 1, true, "", "hybrid");
        }
    </script>