The L.ALKMaps.Layer.BaseMap
layer is used to display the ALK Maps tiles in your map container. The four parameters of the BaseMap layer are region
, dataset
, style
, and attribution
. These parameters will be explained in further detail later in this page.
Map styles are there to provide the visual styling for the map. See the chart below for examples of each style.
Enumeration | Example |
---|---|
ALKMaps.STYLE.TRANSPORTATION |
|
ALKMaps.STYLE.DATALIGHT |
|
ALKMaps.STYLE.DATADARK |
|
ALKMaps.STYLE.BASIC |
|
ALKMaps.STYLE.SATELLITE var baseLayer = L.ALKMaps.Layer.baseMap({ style: ALKMaps.STYLE.SATELLITE, imgsrc: "sat1" // Available options are sat1, sat2, ..., sat5, sat6 }); |
|
ALKMaps.STYLE.TERRAIN |
|
ALKMaps.STYLE.DEFAULT
Deprecated This style redirects to
ALKMaps.STYLE.TRANSPORTATION .
|
|
ALKMaps.STYLE.CLASSIC
Deprecated This style redirects to
ALKMaps.STYLE.TRANSPORTATION .
|
|
ALKMaps.STYLE.MONOCHROME
Deprecated This style redirects to
ALKMaps.STYLE.DATALIGHT .
|
|
ALKMaps.STYLE.ROADATLAS
Deprecated This style redirects to
ALKMaps.STYLE.TRANSPORTATION .
|
|
ALKMaps.STYLE.CONTEMPORARY
Deprecated This style redirects to
ALKMaps.STYLE.DATADARK .
|
|
ALKMaps.STYLE.SMOOTH
Deprecated This style redirects to
ALKMaps.STYLE.DATALIGHT .
|
|
ALKMaps.STYLE.LIGHTNESS
Deprecated This style redirects to
ALKMaps.STYLE.DATALIGHT .
|
|
ALKMaps.STYLE.NIGHT
Deprecated This style redirects to
ALKMaps.STYLE.DATADARK .
|
You may change the style using the BaseMap layer's setStyle
function.
baseLayer.setStyle("night");
You may change map overlay styles using the BaseMap layer's drawergroups
option.
// Add drawer groups in the constructor. var baseLayer = L.ALKMaps.Layer.baseMap({ drawergroups: ALKMaps.CONTENT.COMMERCIAL }); // Other ways to modify drawer groups // Add drawer groups. baseLayer.addContent(ALKMaps.CONTENT.BORDERS); // Remove drawer groups. baseLayer.removeContent(ALKMaps.CONTENT.COMMERCIAL); // Replace existing drawers with default drawers. baseLayer.setContent(ALKMaps.CONTENT.DEFAULT); // Available drawer groups: // ALKMaps.CONTENT.CITIES // ALKMaps.CONTENT.LABELS // ALKMaps.CONTENT.ROADS // ALKMaps.CONTENT.COMMERCIAL // ALKMaps.CONTENT.BORDERS // ALKMaps.CONTENT.AREAS // ALKMaps.CONTENT.DEFAULT
For those who have access, you may view tiles from different data regions and datasets all around the world. The different options for both region and dataset are shown in the table below.
Parameter | Type/Values | Description |
---|---|---|
region |
[NA | EU | OC | SA | AS | AF | ME]
|
NA: North America
EU: Europe OC: Australia SA: South America AF: Africa ME: Middle East AS: Asia |
dataset |
[Current | PCM_EU | PCM_OC | PCM_SA | Default: Current
|
Current: NA/Current
PCM_EU: Europe PCM_OC: Australia PCM_SA: South America PCM_AF: Africa PCM_ME: Middle East PCM_IN: India PCM_SE: South East Asia |
You can also change the both the region and dataset by using the BaseMap layer's setRegion
and setDataset
funcitons respectively.
baseLayer.setRegion("EU"); baseLayer.setDataset("PCM_EU");