ALKMaps.Layer.BaseMap (Leaflet)

The ALKMaps tile layer.  L.ALKMaps.Layer.Tile class is the same as L.ALKMaps.Layer.BaseMap class.

Inherits from

  • <L.TileLayer>
Summary
ALKMaps.Layer.BaseMap (Leaflet)The ALKMaps tile layer.
Properties
projection{String} Map projection code.
region{String} map data region code
dataset{String} map data set
style{String} map style
imgsrc{String} satellite provider may take effect only if style is set to satellite.
attribution{String} Leaflet.TileLayer attribution setting
attrPosition{String} Leaflet.TileLayer attrPosition setting.
attrUseHyperlink{Boolean} Leaflet.TileLayer attrUseHyperlink setting.
minZoom{Number} Leaflet.TileLayer minimum zoom setting.
maxZoom{Number} Leaflet.TileLayer maximum zoom setting.
isBaseLayer{Boolean} Flag indicating if the Tile layer instance is the base layer.
tileSize{Number} Width of the tile.
drawergroups{String} Comma separated string values such as “cities,labels”.
Constructor
L.ALKMaps.Layer.TileInitializes a new Tile layer object
Functions
setStylesets/changes style of the map
setRegionsets/changes region of the map
setDatasetsets/changes dataset of the map
cloneCreate a clone of this layer
cloneOverlayLayerClones the base map layer with some modifications.
addContentAdd map drawers.
setContentInitialize drawergroups and then add map drawers.
removeContentRemove map drawers Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings.
tileCreate a new L.ALKMaps.Layer.Tile instance
baseMapThe same as tile method.

Properties

projection

{String} Map projection code.  Default is “EPSG:900913”.

// Get map projection for this layer.
var projection = tileLayer.projection;
// Set map projection for this layer. Or projection can be passed in as options parameter when the layer instance is created.
tileLayer.projection = L.CRS.EPSG900913.code;

region

{String} map data region code

dataset

{String} map data set

style

{String} map style

imgsrc

{String} satellite provider may take effect only if style is set to satellite.  Default is null.  Available options are sat1, sat2, sat3, sat4, sat5, sat6.

attribution

{String} Leaflet.TileLayer attribution setting

attrPosition

{String} Leaflet.TileLayer attrPosition setting.  Specify “topleft” for top left of map, “topright” for top right, “bottomleft” for bottom left or “bottomright” for bottomright.  Defaults to “bottomright”.

attrUseHyperlink

{Boolean} Leaflet.TileLayer attrUseHyperlink setting.  Whether or not to show the hyperlink to alk maps in the attribution.  Defaults to true.

minZoom

{Number} Leaflet.TileLayer minimum zoom setting.  Will be overridden by map’s equivalent option.

maxZoom

{Number} Leaflet.TileLayer maximum zoom setting.  Will be overridden by map’s equivalent option.

isBaseLayer

{Boolean} Flag indicating if the Tile layer instance is the base layer.

tileSize

{Number} Width of the tile.

drawergroups

{String} Comma separated string values such as “cities,labels”.  If not supplied, ALKMaps.CONTENT.DEFAULT will be used.  DEFAULT values are “cities,labels,roads,borders,areas”.

Constructor

L.ALKMaps.Layer.Tile

Initializes a new Tile layer object

Parameters

options{Object} Tile Layer Options

Functions

setStyle

setStyle: function (styleName)

sets/changes style of the map

Parameters

styleName{String} map style (“default”, “classic”, “night” ,...)

setRegion

setRegion: function (regionCode)

sets/changes region of the map

Parameters

regionCode{String} the code for the map region (“NA”, “AS”, “EU”, ...)

setDataset

setDataset: function (dataset)

sets/changes dataset of the map

Parameters

dataset{String} the code for the map dataset (“Current”, “PCM_AS”, “PCM_EU”, ...)

clone

clone: function (params)

Create a clone of this layer

Parameters

imgoption{String} Specifies the type of satellite map request.

Returns

{L.ALKMaps.Layer.Tile} The cloned layer.

cloneOverlayLayer

cloneOverlayLayer: function (params)

Clones the base map layer with some modifications.  Mainly used for overlaying transparent map on satellite map at this time.

Parameters

imgoption{String} Specifies the type of satellite map request.

Returns

{L.ALKMaps.Layer.Tile} The cloned layer.

addContent

addContent: function (contentToAdd)

Add map drawers.  Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings. do processing to ensure it’s an array of strings.

setContent

setContent: function (content)

Initialize drawergroups and then add map drawers.  Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings.  Do processing to ensure it’s an array of strings.

removeContent

removeContent: function (contentToRemove)

Remove map drawers Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings.  Do processing to ensure it’s an array of strings.

tile

layer.tile = function (map,
options)

Create a new L.ALKMaps.Layer.Tile instance

Parameters

options{Object} Tile Layer Options
var tileLayer = L.ALKMaps.Layer.tile(options);

Returns

{Object} An instance of L.ALKMaps.Layer.Tile

baseMap

The same as tile method.

setStyle: function (styleName)
sets/changes style of the map
setRegion: function (regionCode)
sets/changes region of the map
setDataset: function (dataset)
sets/changes dataset of the map
clone: function (params)
Create a clone of this layer
cloneOverlayLayer: function (params)
Clones the base map layer with some modifications.
addContent: function (contentToAdd)
Add map drawers.
setContent: function (content)
Initialize drawergroups and then add map drawers.
removeContent: function (contentToRemove)
Remove map drawers Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings.
layer.tile = function (map,
options)
Create a new L.ALKMaps.Layer.Tile instance
Initializes a new Tile layer object
Close