A versatile and lightweight toolkit for building a simple web map.
This project is maintained by qqnluaq
The "viewer"
section of the SMK configuration controls the overall properties of the map.
This includes the type of map engire to use ("type"
property), the starting position of the map ("location"
property), the type of devide the application is running on ("device"
property), and what theme to apply to map’s user interface elements ("themes"
property).
These are the default values for the "viewer"
configuration.
Click on a property name for more information:
{ "viewer": { "type": "leaflet", "device": "auto", "deviceAutoBreakpoint": 500, "themes": null "panelWidth": 300, "baseMap": "Topographic", "activeTool": null, "location": { "extent": [ -139.1782, 47.6039, -110.3533, 60.5939 ], "center": [ -124.76575, 54.0989 ], "zoom": 5, } } }
"type": String
The type of map viewer to use. There are two options:
"leaflet"
- use the Leaflet viewer."esri3d"
- use the ESRI ArcGIS 3D viewer."device": String
The type of device that the map application is running on. There are three options:
"auto"
- detect the device automatically (see "deviceAutoBreakpoint"
property)."desktop"
- user interface assumes that the device is a desktop computer browser."mobile"
- user interface assumes that the device is a mobile device."deviceAutoBreakpoint": Number
When the "device"
property is "auto"
, this value is used to detect if the device is "desktop"
or "mobile"
.
The width of the browser frame is compared with this property, and if the browser frame width is the larger value, then the "device"
property is "desktop"
; otherwise "mobile"
is used.
"themes": Array
Load additional UI themes at startup. These themes are defined:
"alpha"
"beta"
"gamma"
"delta"
This property and the themes are experimental.
"panelWidth": Number
The width of the UI panel, in pixels.
"baseMap": String
The name of the basemap to display at startup. These are the possible values:
"Topographic"
"Streets"
"Imagery"
"Oceans"
"NationalGeographic"
"ShadedRelief"
"DarkGray"
"Gray"
"StamenTonerLight"
"activeTool": String
If this property is set to the id of a tool, then this tool will be active when the map is finished initialization.
"location": String
The location that map shows when the map starts. The default value is the map centered on BC, at zoom level 5, which shows the whole province.
"location": { "extent": Array }
The extent which must be displayed by the map at startup.
The array contains 4 values, which are in order: [MIN-LONG]
,[MIN-LAT]
,[MAX-LONG]
,[MAX-LAT]
.
This take precedence over any center and zoom settings.
"location": { "center": Array }
The center point of the map at startup.
The array contains 2 values, which are in order: [LONG]
,[LAT]
.
"location": { "zoom": Number }
The zoom level of the map at startup. This is a value from 0 (whole world) to 30. The default value is 5, which shows the whole province of BC.