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.
ALKMaps. | Instances 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. | Create a new ALK Maps RoadSurface overlay. |
Functions | |
setMap | |
clone | Create a clone of this layer. |
getURL | Return a query string for this layer. |
getXYZ | Calculates x, y and z for the given bounds. |
getFullRequestString | Combine the layer’s url with its params and these newParams. |
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.
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 });
name | {String} A name for the layer |
params | {Object} An object with key/value pairs representing the parameters for the layer. |
options | {Object} Hashtable of extra options to tag onto the layer. These options include all properties from the Grid parent class. |
clone: function( obj )
Create a clone of this layer.
{ALKMaps.Layer.BaseMap} An exact clone of this layer
getURL: function( bounds )
Return a query string for this layer.
bounds | {ALKMaps.Bounds} A bounds representing the bbox for the request. |
{String} A string with the layer’s url and parameters.
Calculates x, y and z for the given bounds.
bounds | {ALKMaps.Bounds} |
{Object} | an object with x, y and z properties. |
setMap: function ( map )
Create a clone of this layer.
clone: function( obj )
Return a query string for this layer.
getURL: function( bounds )
Combine the layer’s url with its params and these newParams.
getFullRequestString: function( newParams, altUrl )