TibcoLayer.js

TibcoLayer()


constructor
Inherits from TileLayer

The class responsible for adding tiles of a specific type and style to the map. Adds the TIBCO copyright prefix to the attribution control by default.

Options:
  • mapType(MapTypes)The map tiles type (default: STANDARD)
  • mapStyle(MapStyles)The map tiles style (default: LIGHT)
Events:
  • attribution-updateUpdates the attribution control options with layer attribution options.
  • layer-attribution-resetResets the attribution control.
Parameter Type Description
options Object The layer options

Example

$(document).ready(function(){

    var mapContainer = T.DomUtil.get("map"),
        tibcoLayerStandard = new T.TibcoLayer({name: "TibcoLayer 1"}),
        tibcoLayerBorders = new T.TibcoLayer({
            name: "TibcoLayer 2",
            mapType: T.MapTypes.BORDERS,
            mapStyle: T.MapStyles.DARK
        });

    var map = new T.Map(
        mapContainer,					
        {
            zoom: 3, 
            center: new T.LatLng(46, 2),
            controls: {
                attribution: {
                    prefix: "<a href=''>©TIBCO</a>"
                }
            }						
        }
    );								

    map.addLayer(tibcoLayerStandard);
    map.addLayer(tibcoLayerBorders);

    //Create and add the layers control
    var layersControl = new T.LayersControl({
        offset: [10, 10]
    });

    map.addControl(layersControl);

    //Create and add the layers control
    var tibcoMapControl = new T.TibcoMapControl({
        offset: [10, 10]
    });

    map.addControl(tibcoMapControl);
});
<html>    
    <head>
        <title>TibcoMaps - Simple map</title>
        <meta charset="UTF-8">

        <!-- CSS -->
        <link rel="stylesheet", href="tibco-layer.css"/>
        <link rel="stylesheet" type="text/css" href='../lib/GeoAnalytics.css'>
        
        <!-- Javascript -->
        <script type="text/javascript" src='../lib/GeoAnalytics.js'></script>
        <script type="text/javascript" src='../lib/jquery-1.9.1.min.js'></script>	
        <script type="text/javascript" src="tibco-layer.js"></script>	
        
      
    </head>
    
    <body>
        <div class="custom-container">
            <div id="map"></div>
        </div>
    </body>
</html>
body, html { 
    height: 100%;
    width: 100%;
    margin: 0px;
}

.custom-container  {
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;   
}

#map {			
    width: 100%;
    height: 100%;
}