A versatile and lightweight toolkit for building a simple web map.
This project is maintained by qqnluaq
The "layers"
tool "display"
property is an array of Display objects.
There are 3 types of objects:
This object represents a layer from the "layers"
section of the configuration.
This object is container for a collection of Display objects. The folder can be expanded and collapsed in the layers tool, so the internal structure of the folder is accessible. The visibility of the folder determines the visibility of all the child objects.
This object is container for a collection of Display objects.
The group cannot be expanded in the layers tool, and so the internal structure of the group is hidden from the user.
The visibility of the group determines the visibility of all the child objects.
Because the internal structure is invisible, the only Display objects that make sense as child objects are { "type": "layer" }
.
This object represents a layer from the "layers"
section of the configuration.
{ "type": "layer", "id": "layer1", "title": "Layer 1", "isVisible": true, }
"id"
: String
The id of a layer from the "layers"
section of the configuration.
"title"
: String
The title to show for the layer.
If this property is missing, the title is taken from the layer object refered to by "id"
.
"isVisible"
: Boolean
Determines initial visibility of the layer.
If this property is missing, then the initial visibility is taken from the "isVisible"
is taken from the layer object refered to by "id"
.
This object is container for a collection of Display objects. The folder can be expanded and collapsed in the layers tool, so the internal structure of the folder is accessible. The visibility of the folder determines the visibility of all the child objects.
{ "type": "folder", "id": "folder1", "title": "Folder 1", "isVisible": true, "isExpanded": false, "items": [ ... ], }
"id"
: String
The id of the folder, which must be unique. It can be omitted, and an id will be generated for the folder.
"title"
: String
The title to show for the folder.
"isVisible"
: Boolean
Determines initial visibility of the folder, and consequently the visibility of all Display object contained within.
The default value is true
.
"isExpanded"
: Boolean
Determines initial expanded state of the folder.
The default value is false
, ie not expanded.
"items"
: Array
An array containing Layer Display objects, that are contained in this folder.
This object is container for a collection of Display objects. The group cannot be expanded in the layers tool, and so the internal structure of the group is hidden from the user. The visibility of the group determines the visibility of all the child objects.
{ "type": "group", "id": "group1", "title": "Group 1", "isVisible": true, "items": [ ... ], }
"id"
: String
The id of the group, which must be unique. It can be omitted, and an id will be generated for the group.
"title"
: String
The title to show for the group.
"isVisible"
: Boolean
Determines initial visibility of the group, and consequently the visibility of all Display object contained within.
The default value is true
.
"items"
: Array
An array containing Layer Display objects.
Because the internal structure is invisible, the only Display objects that make sense as child objects are { "type": "layer" }
.