BaseMap Layer
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
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 You can choose a satellite image provider by setting the imgsrc parameter. Values other than Default require a premium add-on license. Sat1 (DigitalGlobal) is a premium satellite option that provides Trimble Maps curated satellite images and tiles, when available.Other premium options include Sat2 (DigitalGlobeConsumer), Sat3 (DigitalGlobeTrueCurrency), Sat4 (DigitalGlobeColorConsumer), Sat5 (DigitalGlobeAPIVivid), and Sat6 (DigitalGlobeAPIRecent).
Sample Code
| |
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("basic");
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
Regions
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 |
This parameter is optional. If region is not set, it will default to the appropriate region based on your map data licensing.
|
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 both the region and dataset by using the BaseMap layer’s setRegion
and setDataset
functions respectively.
baseLayer.setRegion("EU");
baseLayer.setDataset("PCM_EU");