{ "definitions": {}, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/hslayers/map-compositions/1.0.0/schema.json", "type": "object", "title": "Schema of map compositions supported in Hslayers-ng", "required": [ "abstract", "title", "extent", "projection", "layers" ], "properties": { "abstract": { "$id": "#/properties/abstract", "type": "string", "title": "The Abstract Schema", "default": "", "examples": [ "Na mapě jsou zobrazené třídy ochrany půdy v Libereckém kraji" ], "pattern": "^(.*)$" }, "name": { "$id": "#/properties/name", "type": "string", "title": "Same as #/properties/abstract for backwards compatibility", "default": "", "examples": [ "Na mapě jsou zobrazené třídy ochrany půdy v Libereckém kraji" ], "pattern": "^(.*)$" }, "title": { "$id": "#/properties/title", "type": "string", "title": "The Title Schema", "default": "", "examples": [ "Třídy ochrany půdy" ], "pattern": "^(.*)$" }, "extent": { "$id": "#/properties/extent", "type": "array", "title": "Composition extent in EPSG:4326", "items": { "$id": "#/properties/extent/items", "type": "string", "title": "The Items Schema", "default": "", "examples": [ "14.62", "50.58", "15.42", "50.82" ], "pattern": "^(.*)$" } }, "user": { "$id": "#/properties/user", "type": "object", "title": "The User Schema", "description": "Used in status manager but not in hslayers", "required": [ "email", "name" ], "properties": { "email": { "$id": "#/properties/user/properties/email", "type": "string", "title": "The Email Schema", "default": "", "examples": [ "dmitrii@seznam.cz" ], "pattern": "^(.*)$" }, "name": { "$id": "#/properties/user/properties/name", "type": "string", "title": "The Name Schema", "default": "", "examples": [ "Dmitrij Kožuch" ], "pattern": "^(.*)$" } } }, "groups": { "$id": "#/properties/groups", "type": "object", "title": "The Groups Schema", "description": "Used in status manager but not in hslayers", "required": [ "guest" ], "properties": { "guest": { "$id": "#/properties/groups/properties/guest", "type": "string", "title": "The Guest Schema", "default": "", "examples": [ "r" ], "pattern": "^(.*)$" } } }, "scale": { "$id": "#/properties/scale", "type": "number", "description": "Currently not supported in HsLayers", "title": "The Scale Schema", "default": 0, "examples": [ 1 ] }, "projection": { "$id": "#/properties/projection", "type": "string", "title": "The Projection Schema", "default": "", "examples": [ "epsg:3857", "EPSG:4326" ], "pattern": "^(.*)$" }, "center": { "$id": "#/properties/center", "type": "array", "title": "Center of composition", "description": "Currently not supported in HsLayers", "items": { "$id": "#/properties/center/items", "type": "number", "title": "The Items Schema", "default": 0, "examples": [ 1672068, 6568819 ] } }, "units": { "$id": "#/properties/units", "type": "string", "title": "The Units Schema", "description": "Currently not supported in HsLayers", "default": "", "examples": [ "degrees", "imperial", "nautical", "metric", "us" ], "pattern": "^(.*)$" }, "layers": { "$id": "#/properties/layers", "type": "array", "title": "The Layers Schema", "items": { "$id": "#/properties/layers/items", "type": "object", "title": "The Items Schema", "required": [ "metadata", "visibility", "title", "className" ], "properties": { "metadata": { "$id": "#/properties/layers/items/properties/metadata", "type": "object", "title": "The Metadata Schema" }, "visibility": { "$id": "#/properties/layers/items/properties/visibility", "type": "boolean", "title": "Visibility", "default": false, "examples": [ true ] }, "base": { "$id": "#/properties/layers/items/properties/base", "type": "boolean", "title": "Base layer", "description": "Is the layer one of the base layers", "default": false, "examples": [ true ] }, "opacity": { "$id": "#/properties/layers/items/properties/opacity", "type": [ "string", "number" ], "title": "Opacity", "default": "", "examples": [ "1" ], "pattern": "^(.*)$" }, "path": { "$id": "#/properties/layers/items/properties/path", "type": "string", "title": "Path of folder structure to group the layer into", "default": "", "examples": [ "Climatic data/Time layers" ], "pattern": "^(.*)$" }, "title": { "$id": "#/properties/layers/items/properties/title", "type": "string", "title": "Title", "default": "", "examples": [ "Třídy ochrany půdy" ], "pattern": "^(.*)$" }, "className": { "$id": "#/properties/layers/items/properties/className", "type": "string", "title": "Classname", "description": "Big type of layer. Currently all raster layers are wms layers and Vector layers are subdivided by protocol property", "default": "", "enum": [ "HSLayers.Layer.WMS", "OpenLayers.Layer.Vector", "WMS", "WFS", "Vector", "XYZ", "ArcGISRest", "StaticImage" ], "examples": [ "HSLayers.Layer.WMS" ], "pattern": "^(.*)$" }, "singleTile": { "$id": "#/properties/layers/items/properties/singleTile", "type": "boolean", "title": "Single tile requests", "description": "Use single request to WMS provider to get map for the whole screen", "default": false, "examples": [ true ] }, "displayInLayerSwitcher": { "$id": "#/properties/layers/items/properties/displayInLayerSwitcher", "type": "boolean", "title": "Visibility of layer in layer switcher", "default": true, "examples": [ true ] }, "wmsMaxScale": { "$id": "#/properties/layers/items/properties/wmsMaxScale", "type": "number", "title": "Wmsmaxscale", "description": "Deprecated maxScale property used in old OpenLayers2. Is here just for historical reasons", "default": 0, "examples": [ 0 ] }, "legends": { "$id": "#/properties/layers/items/properties/legends", "type": "array", "title": "The Legends Schema", "items": { "$id": "#/properties/layers/items/properties/legends/items", "type": "string", "title": "The Items Schema", "default": "", "examples": [ [ "https%3A%2F%2Fgeoportal.kraj-lbc.cz%2Fcgi-bin%2Fmapserv%3Fmap%3D%2Fdata%2Fgis%2FMapServer%2Fprojects%2Fwms%2Fatlas%2Fpuda.map%26version%3D1.3.0%26service%3DWMS%26request%3DGetLegendGraphic%26sld_version%3D1.1.0%26layer%3Dtridyochrany%26format%3Dimage%2Fpng%26STYLE%3Ddefault" ] ], "pattern": "^(.*)$" } }, "protocol": { "$id": "#/properties/layers/items/properties/protocol", "type": "object", "title": "The Protocol Schema", "properties": { "format": { "$id": "#/properties/layers/items/properties/protocol/properties/format", "type": "string", "enum": [ "ol.format.KML", "ol.format.GeoJSON", "hs.format.WFS", "hs.format.externalWFS", "hs.format.Sparql" ], "title": "Layer procol format" }, "url": { "$id": "#/properties/layers/items/properties/protocol/properties/url", "type": "string", "title": "URL to load geojson, kml and other data from" } } }, "attribution": { "$id": "#/properties/layers/items/properties/attribution", "type": "object", "title": "Attribution", "properties": { "OnlineResource": { "$id": "#/properties/layers/items/properties/attribution/properties/OnlineResource", "type": "string", "title": "URL of layer attribution", "examples": [ "https://www.openstreetmap.org/copyright" ] }, "Title": { "$id": "#/properties/layers/items/properties/attribution/properties/Title", "type": "string", "title": "Human readable attribution", "examples": [ "OpenStreetMap" ] } } }, "features": { "$id": "#/properties/layers/items/properties/features", "type": "string", "title": "GeoJSON serialized feature collection", "default": null }, "maxResolution": { "$id": "#/properties/layers/items/properties/maxResolution", "type": [ "number", "null" ], "title": "The Maxresolution Schema", "default": "Number.Infinity", "examples": [ 8000 ] }, "minResolution": { "$id": "#/properties/layers/items/properties/minResolution", "type": [ "number", "null" ], "title": "The Minresolution Schema", "default": 0, "examples": [ 0 ] }, "url": { "$id": "#/properties/layers/items/properties/url", "type": "string", "title": "URL of WMS service", "description": "WMS service URL. Vector layers which are loaded from file, see #/properties/layers/items/properties/protocol/properties/url property", "default": "", "examples": [ "https%3A%2F%2Fgeoportal.kraj-lbc.cz%2Fcgi-bin%2Fmapserv%3Fmap%3D%2Fdata%2Fgis%2FMapServer%2Fprojects%2Fwms%2Fatlas%2Fpuda.map%26" ], "pattern": "^(.*)$" }, "urls": { "$id": "#/properties/layers/items/properties/urls", "type": "array", "title": "Urls array of ArcGISRest service", "description": "Urls array of ArcGISRest service.", "default": "", "examples": [ [ "https://example.com/arcgis/rest/services/map_pub/MapServer" ] ] }, "params": { "$id": "#/properties/layers/items/properties/params", "type": "object", "title": "The Params Schema", "properties": { "LAYERS": { "$id": "#/properties/layers/items/properties/params/properties/LAYERS", "type": "string", "title": "WMS Layer. LAYERS parameter is mandatory for WMS services.", "default": "", "examples": [ "tridyochrany" ], "pattern": "^(.*)$" }, "FORMAT": { "$id": "#/properties/layers/items/properties/params/properties/FORMAT", "type": "string", "title": "Image format for WMS", "default": "", "examples": [ "image/png" ], "pattern": "^(.*)$" }, "VERSION": { "$id": "#/properties/layers/items/properties/params/properties/VERSION", "type": "string", "title": "The Version Schema", "default": "1.3.0", "examples": [ "1.3.0" ], "pattern": "^(.*)$" }, "STYLES": { "$id": "#/properties/layers/items/properties/params/properties/STYLES", "type": "string", "title": "WMS Layer styles", "default": "", "examples": [ "default" ], "pattern": "^(.*)$" } } }, "ratio": { "$id": "#/properties/layers/items/properties/ratio", "type": "number", "title": "Ratio of image requests", "description": "Not used by HsLayers yet. Ratio. 1 means image requests are the size of the map viewport, 2 means twice the width and height of the map viewport, and so on. Must be 1 or higher.", "default": 1.5, "examples": [ 1.5 ] }, "projection": { "$id": "#/properties/layers/items/properties/projection", "type": "string", "title": "Projection of layer if it is different from the map projection for the whole application", "default": null, "examples": [ "EPSG:4326" ] }, "style": { "$id": "#/properties/layers/items/properties/style", "type": "object", "title": "Style of vector layer features", "description": "", "examples": [ { "stroke": { "color": "rgba(238, 156, 150, 1)", "width": 23 }, "fill": { "color": "rgba(238, 156, 150, 1)" } }, { "stroke": { "color": "rgba(238, 156, 150, 1)", "width": 23 }, "image": { "src": "data:image/svg+xml;base64,PHN2ZyB4bWxuc==", "type": "icon" } } ] }, "dimensions": { "$id": "#/properties/layers/items/properties/dimensions", "type": "object", "title": "Dimensions for layer like time, depth etc.", "description": "dimensions for tile requests. This is an object with properties named like the advertised WMTS dimensions.", "examples": [ { "time": { "name": "time", "values": "2016-01-01T12:00:00.000Z/2018-01-01T12:00:00.000Z/PT24H" }, "elevation": { "name": "elevation", "label": "depth", "values": [ 1, 100, 1000 ] } } ] }, "workspace": { "$id": "#/properties/layers/items/properties/workspace", "type": "string", "title": "Workspace name", "description": "Layman workspace name", "examples": [ "workspacename" ] } } } }, "current_base_layer": { "$id": "#/properties/current_base_layer", "type": [ "object", "null" ], "title": "Default base layer selected", "default": null, "properties": { "title": { "$id": "#/properties/current_base_layer/properties/title", "type": "string", "title": "Title", "default": "", "examples": [ "OpenStreetMap" ], "pattern": "^(.*)$" } }, "examples": [ { "title": "OpenStreetMap" } ] } } }