ALKMaps.Layer.RoadSurface

Instances of ALKMaps.Layer.RoadSurface are used to display RoadSurface maps.  This layer can’t be used as a base layer or it can’t be set to SingleTile.

Inherits from

Summary
ALKMaps.Layer.RoadSurfaceInstances of ALKMaps.Layer.RoadSurface are used to display RoadSurface maps.
Properties
isBaseLayer{Boolean} Default is false for RoadSurface layer.
projection{String} Use Spherical Mercator for RoadSurface.
hourOffset{Number} An hour offset for which road surface tiles are desired.
provider{String} Default is “RC1”.
disableCache{Boolean} Prevents web browser caches content for the same image URL if it is set to true.
Constructor
ALKMaps.Layer.RoadSurfaceCreate a new ALK Maps RoadSurface overlay.
Functions
setMap
cloneCreate a clone of this layer.
getURLReturn a query string for this layer.
getXYZCalculates x, y and z for the given bounds.
getFullRequestStringCombine the layer’s url with its params and these newParams.

Properties

isBaseLayer

{Boolean} Default is false for RoadSurface layer.

projection

{String} Use Spherical Mercator for RoadSurface.  “EPSG:900913” only

hourOffset

{Number} An hour offset for which road surface tiles are desired.  Example pass in 0 for current time, 3 for three hours from now.

provider

{String} Default is “RC1”.

disableCache

{Boolean} Prevents web browser caches content for the same image URL if it is set to true.

Constructor

ALKMaps.Layer.RoadSurface

Create a new ALK Maps RoadSurface overlay.  You can display the current RoadSurface condition or show future RoadSurface prediction based on hourOffset.  It has to be Spherical Mercator projection and not singleTile and not base layer.  In order to overlay RoadSurface layer properly, the base layer has to use the same projection.

Examples

The code below creates a simple real-time RoadSurface layer.

var alkRoadSurface = new ALKMaps.Layer.RoadSurface("ALK RoadSurface", {}, {
         displayInLayerSwitcher: true
    });

The code below creates a RoadSurface layer with future prediction.

var alkRoadSurface = new ALKMaps.Layer.RoadSurface("ALK RoadSurface", {
        hourOffset: 6
    }, {
        displayInLayerSwitcher: true
    });

Parameters

name{String} A name for the layer
params{Object} An object with key/value pairs representing the parameters for the layer.
  • hourOffset - {Number} An hour offset for which road surface tiles are desired.  Example pass in 0 for current time, 3 for three hours from now.
options{Object} Hashtable of extra options to tag onto the layer.  These options include all properties from the Grid parent class.

Functions

setMap

setMap: function (map)

Parameters

map{ALKMaps.Map} The map.

clone

clone: function(obj)

Create a clone of this layer.

Returns

{ALKMaps.Layer.BaseMap} An exact clone of this layer

getURL

getURL: function(bounds)

Return a query string for this layer.

Parameters

bounds{ALKMaps.Bounds} A bounds representing the bbox for the request.

Returns

{String} A string with the layer’s url and parameters.

getXYZ

Calculates x, y and z for the given bounds.

Parameters

bounds{ALKMaps.Bounds}

Returns

{Object}an object with x, y and z properties.

getFullRequestString

getFullRequestString: function(newParams,
altUrl)

Combine the layer’s url with its params and these newParams.

Parameters

newParams{Object}
altUrl{String} Use this as the url instead of the layer’s url

Returns

{String} Layer url.

setMap: function (map)
clone: function(obj)
Create a clone of this layer.
getURL: function(bounds)
Return a query string for this layer.
getFullRequestString: function(newParams,
altUrl)
Combine the layer’s url with its params and these newParams.
Base class for layers that use a lattice of tiles.
Instances of ALKMaps.Map are interactive maps embedded in a web page.
Instances of ALKMaps.Layer.BaseMap are used to display data from ALK Web Service Create a new ALK Map layer with the ALKMaps.Layer.BaseMap constructor.
Instances of this class represent bounding boxes.
Close