Tour API Demos Download Tests
Aperture version 1.0
Generated by: JsDoc Toolkit 2.4.0

Class aperture.geo.MapTileLayer.TMS

A Tile Mapping Service (TMS) specification. TMS relies on client information to be supplied about extents and available zoom levels but can be simply stood up as a service by deploying a static set of named tiles.

Class Summary
Constructor Attributes Constructor Name and Description
 
MapTileLayers may be configured as base layers in Map construction, or later added as overlay layers by calling addLayer on a parent layer.

Method Summary

Class Detail

aperture.geo.MapTileLayer.TMS(spec)
MapTileLayers may be configured as base layers in Map construction, or later added as overlay layers by calling addLayer on a parent layer. This layer constructor is never called directly.
var spec = {
    name : 'My TMS Layer',
    url : 'http://mysite/mytiles/',
    options : {
        layername: 'mynamedlayer',
        type: 'png'
    }
};

// EXAMPLE ONE: create a map and explicitly set the base tile layer
var map = new Map({
     options : {
         'projection': 'EPSG:900913',
         'displayProjection': 'EPSG:900913',
         'units': 'm',
         'numZoomLevels': 9,
         'maxExtent': [
             -20037500,
             -20037500,
             20037500,
             20037500
          ]
     },
     baseLayer : {
         TMS: spec
     }
});

// EXAMPLE TWO: overlay a layer on a map with an existing base layer
map.addLayer( aperture.geo.MapTileLayer.TMS, {}, spec );
Parameters:
{Object} spec
a specification object
{String} spec.name
the local name to give the layer.
{String} spec.url
the source url for the tiles.
{Object} spec.options
implementation specific options.
{String} spec.options.layername
required name of the served layer to request of the source tile data.
{String} spec.options.type
required type of the images in the source tile data.