Base Layer

The BaseMap layer provides you with a map that allows you to choose both a map style and what features you would like to display on the map.

var baseMapLayer = new ALKMaps.Layer.BaseMap( "ALK Maps", {region:"EU"}, {displayInLayerSwitcher: false});

You can customize the visual display of the BaseMap layer by changing the style to alter the color palette of the layer.

Starting from version 1.1, a BaseMap layer will be added automatically when an instance of ALKMaps.Map is created. This default BaseMap layer will have ALKMaps.STYLE.TRANSPORTATION style, all feature drawers, and North America region, without showing in the layer switcher control. There are a couple of ways that user can overwrite this default layer. For example, user can create an instance of ALKMaps.Layer.BaseMap and add this instance to the map by calling ALKMaps.Map addLayer(s) methods. In the layer adding process, the default BaseMap layer will be removed if a new BaseMap is provided. The default BaseMap layer has the name of the map id plus "_ALKMaps.Layer.BaseMap". Name like this in a custom BaseMap layer should be discouraged since layer name and class name are used to identify the default BaseMap layer.

Starting from version 1.2, the default projection for any BaseMap layer instance is Spherical Mercator.

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 Transportation Map Style
ALKMaps.STYLE.DATALIGHT Data Light Map Style
ALKMaps.STYLE.DATADARK Data Dark Map Style
ALKMaps.STYLE.BASIC Basic Map Style
ALKMaps.STYLE.SATELLITE Satellite Map Style
ALKMaps.STYLE.TERRAIN Terrain Map Style
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.

For most styles, when a base map is requested, there is only one layer. Satellite style map is slightly different. The JavaScript API adds a transparent layer on top of the satellite image but only the satellite image layer will be shown on the layer switcher if the control is added to the map. When user lists all layers that are added to the map, user sees the transparent layer in the list as well. The transparent layer has the name of the satellite layer id plus "_overlay". If user wants to change map style, calling the base layer changeStyle method by passing a map style is desired.

Please note that the Satellite style will only work in the Spherical Mercator projection, otherwise an error will be returned.

You can choose a satellite image provider by setting the imgsrc parameter. Values other than Default require a premium add-on license. sat1(DigitalGlobe) is a premium satellite option that provides Trimble MAPS curated satellite images when available.

Other premium options include sat2(DigitalGlobeConsumter), sat3(DigitalGlobeTrueCurrency), sat4(DigitalGlobeColorConsumter), sat5(DigitalGlobeAPIVivid), sat6(DigitalGlobeAPIRecent).

Map Regions

Description goes here... [Data provider, Data version]

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

If you are a global highway customer that would like to view map data in other regions, you can set the dataset parameter to "Current" to use global highway data.