Click or drag to resize

Telogis.GeoBase.MapLayers.TileLayer

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release

MapLayers.TileLayer inherits from MapLayers.AbstractLayer.

Creates a layer that is responsible for displaying the generated tiles from the tile server.

Constructor
NameDescription
MapLayers.TileLayer(config)

Arguments

  • config (Object) - Configuration options for the MapLayers.TileLayer.

    Properties
    NameTypeDescription
    bufferingPoint

    The pixel width in the x- and y- directions by which to increase the viewport size used in tile fetching, so that tiles will be fetched once they are less than the specified distances from the map.

    Defaults to new Point (0, 0).
    maxRequestsNumber

    The maximum number of tile requests that this tile layer can make per update tick. Raising this number can speed up tile rendering time for this layer. Note that for larger maps with multiple layers, excessive tile requests can cause delays in other functions that make server requests, such as DataQuery, Routing and GeoCoding. In addition, if your TileLayers are created from a Map, the Map will explicitly set maxRequests to Constants.DEFAULT_MAP_LAYER_REQUESTS (with a default value of 8).

    Defaults to 4.
    serversetObject

    An optional object that contains urls and an authToken to be used for tiles on this layer.

    Properties
    NameTypeDescription
    authTokenString

    The GeoStream authentication token to be used for requesting tiles.

    urlsArray

    A string array of GeoStream server urls.

    suppressAuthTokenBoolean

    If set to false, the current authentication token will be included as a URL argument in each request to tile.aspx. If set to true, then the authentication token will instead be stored in a cookie.

    Defaults to false.
    tileConfigObject

    The configuration object that represents the options to be applied to each tile on the map.

    Defaults to {}. Properties
    NameTypeDescription
    argsObject

    Optional extra arguments to pass to the server application. This should be an object whose property names are the keys of the URL parameters to set, with the appropriate corresponding values. Values should not have the same name as existing GeoStream tile request parameters. That is, names should not be any of "a", "auth_geostream", "auxlayer", "d", "data", "dsh", "layer", "msh", "s", "satellite", or "t".

    fadeInBoolean

    Setting fadeIn causes a fading animation to be applied to the tiles when they are loaded. The fadeIncrement and fadeSpeed properties control the appearance of the animation.

    fadeIncrementNumber

    When fadeIn is true, this is the amount to increment the tiles opacity during each tick of the fading animation. 100 is fully opaque.

    fadeSpeedNumber

    When fadeIn is true, this is the time in milliseconds between ticks of the fading animation.

    satelliteBoolean

    Whether to request tiles with satellite imagery. This overrides the "satellite" argument in "args" on this configuration object, and (when used as a boolean) is indeed merely equivalent to setting this to "on". It can also be provided as a string to specify an alternative WMS base layer name, if available. The property is available as a separate configuration property purely for convenience.

    serverPageString

    The server page that the tile images should be requested from. This should be either the name of the page relative to each Telogis.GeoBase service URL, or a fully qualified URL beginning with http:// or https://

    styleObject

    A hash of CSS/Javascript properties to apply to the image element of each tile. The properties width, height and position are fixed.

    suppressTileHashesBoolean

    When suppressTileHashes is true, tile request URLs will not contain dataset name, dataset hash and mapstyle hash parameters. This will prevent browser caches from distinguishing between tiles requested for different datasets or mapstyles.

    transitionConfigObject

    The (potentially empty) configuration object to pass to the MapLayers.TileZoom object used to animate zooming on the MapLayers.TileLayer. If this is not specified, no zoom transition is used.

    Defaults to null.
    useLegacyStyleBoolean

    Indicate that the GeoStream server should serve legacy tiles. Equivalent to including tileConfig: { args: { s: "GB_LEGACY_STYLE" } }. Setting this to true will override any value set on tileConfig.args.s.

    Defaults to false.
    useRetinaBoolean

    Indicate that the GeoStream server should serve high quality retina tiles for use on retina displays. Defaults to true on retina devices and false on non-retina devices.

    zoomTransitionBoolean

    Specifies whether to display a MapLayers.TileZoom transition (overrides MapLayers.TileLayer.config.transitionConfig). Passing true is equivalent to specifying an empty object for MapLayers.TileLayer.config.transitionConfig.

    Defaults to false.
Functions
NameDescription
destroy ()

Disposes of any resources used by the map layer. Call this once the layer is no longer needed if you need to reclaim resources immediately.

getTileConfig ()

Get the information used to create tiles on this layer.

Returns

Object - The configuration object used to create each tile in the layer, see: MapLayers.TileLayer.tileConfig

reconfigureTiles (Object config)

Applies new configuration settings to the MapLayers.TileLayer's tiles, and reloads the layer so that these are visible. The supplied configuration settings are merged with the existing ones, so that while explicitly specified new values will override the old, existing configuration properties that are not specified here will be preserved.

Arguments
  • config (Object) - The object containing the updated configuration properties to pass as the MapLayers.Tile.config parameter to the constructor for each tile displayed in the layer.

setExpiry (Number expirySecs)

Sets the expiry time.

Arguments
  • expirySecs (Number) - Seconds until we get the tiles again.

setTileConfig (Object config)

Set the information used to create tiles on this layer.

Arguments
  • config (Object) - The configuration object used to create each tile in the layer, see: MapLayers.TileLayer.tileConfig

Properties
NameTypeDescription
_expirySecsNumber

Seconds until we get the tiles again.

_timeoutHandleNumber

a timeout handle used to safely terminate the refresh loop.

LoadEventHandler

An event triggered when all the tiles in the layer have completed loading.