Module: caosdb_map

Children

Description

Function: onAdd

onAdd()

Function: onAdd

onAdd()

Function: onAdd

onAdd()

Function: onAdd

onAdd()

Member: caosdb_map:

Member: L:

Member: pov:

Member: ids:

Member: selector:

Member: pov:

Member: pov:

Member: container:

Member: results:

Member: results:

Member: extra_loc_hint:

Member: id:

Member: zoom:

Member: center:

Member: select:

Member: view_change:

Member: tileLayer:

Member: tileLayer:

Member: tileLayer:

Member: sessionStorage[undefined]:

Member: sessionStorage[undefined]:

Member: position:

Member: decimals:

Member: enableUserInput:

Member: useDMS:

Member: panel:

Member: nextview_config:

Member: nextview:

Member: nextview_config:

Member: toggle_button:

Member: entity:

Member: additional_path:

Member: resource:

Member: conf:

Member: color:

Member: border:

Member: "margin-top":

Member: "margin-bottom":

Member: icon:

Member: width:

Member: options:

Member: padding:

Member: "text-align":

Member: "background-color":

Member: position:

Member: bottom:

Member: left:

Member: border:

Member: "border-radius":

Member: "min-width":

Member: options:

Member: button:

Member: tmp_html:

Member: tmp_html:

Member: backgroundColor:

Member: backgroundColor:

Member: options:

Member: button:

Member: options:

Member: button:

Member: color:

Member: weight:

Typedef: MapConfig

The MapConfig object is used to define all relevant parameters for the map including the tiling servers, different views and CRSs of the map, the configuration of the graticule(s) and the data model for the integrated query generator.

Properties

  • string version: the version of the map

  • string default_view: the view which is shown when the user

    opens the map and has no stored view from prior visits to the map. The view are defined in the views property.

  • Array.<ViewConfig> views: array of the configurations for the

    available views of the map. This includes the tiling servers, the graticule, the CRS and more.

  • DataModelConfig datamodel: the data model for the

    display of entities in the map (also used by the query generator).

  • SelectConfig select: config for the query generator.

Typedef: DataModelConfig

The DataModelConfig object is used to define the CaosDB Properties which are interpreted as latitude and longitude in the map.

Note: Both latitude and longitude are expected to be represented in decimal format. The latitude should not exceed [-90°,90°] ranges and the longitude should not exceed [-180°, 180°] ranges.

Properties

  • string lat: the name of the latitude property.

  • string lng: the name of the longitude property.

Typedef: SelectConfig

The SelectConfig object configures the custom {@link select_handler} plugin for the Leaflet.js module, especially the query generation (for searching for Entities in the selected area) and when retrieving entities to be shown.

The generated query for a selected area has the pattern <code>FIND {@link query.role} {@link query.entity} WITH PATH AREA<code>. PATH can be empty or represent a configured path to some entity, e.g. WITH RT1 WITH RT2. AREA stand for the area filter here.

The default values of the {@link query} result in queries for any Record in the selected map area.

Properties

  • object query: The configuration of the query.

  • string query.role: The role of the entities which

    are to be searched in the selected ares.

  • string query.entity: The (parent) entity to be searched

    for in the area. Defaults to empty string.

  • object paths: A dictionary of paths that define from

    which entities the geographic location shall be taken.

Typedef: ViewConfig

The ViewConfig contains the most important parts of the configuration as there are no default values set for legal reasons - each person who is responsible for a CaosDB Server and WebUI has to answer for the configuration of the tiling servers and possibly has to negotiate the terms of use with the tiling service providers or provide an own tiling server.

It governs most of the actual map functionality including the graticule, zoom levels, intial zoom and center of the map, and more.

Furthermore it affects how this view is displayed by the menu of the {@link view_change_handler} plugin.

Note: Leaflet comes with a few pre-defined coordinate reference systems (cf. {@link https://leafletjs.com/reference-1.5.1.html#crs Defined CRSs}). By default, the default CRS of leaflet will be used for the map (which is currently EPSG:3857, the Sperical Mercator). If {@link crs} is a string, e.g. “EPSG:3395” or “Simple” that matches the pre-defined CRS, the pre-defined CRS is used.

Properties

  • string id: the unique view id, used by the

    {@link default_view} property to identify the default view for preserving the active view and view configuration across reloads of the page.

  • string name: the name is shown in the views menu.

  • string description: a short discription of the views

    purpose and properties. Also shown in the views menu when mouse hovers over the name.

  • number zoom: Initial zoom level. Must be an integer and

    >=0.

  • object center: the coordinates of the initial map center.

  • number center.lat: latitude of the initial map center.

  • number center.lng: longitude of the initial map center.

  • TileLayerConfig tileLayer: configuration of the tiling

    server for the base layer of the map.

  • GraticuleConfig graticule: configuration of the graticule

    of the map.

  • string CRSConfig crs: coordinate

    reference system of the map.

Typedef: TileLayerConfig

The TileLayerConfig is a thin extension wrapper around the {@link https://leafletjs.com/reference-1.5.1.html#tilelayer-wms-option TileLayer.WMS options} and the {@link https://leafletjs.com/reference-1.5.1.html#tilelayer-option TileLayer options}.

Only three properties are defined by the wrapper {@link type}, {@link url} and {@link options}.

If {@link type} is “osm”, the tiling layer is configured with an OpenStreetMap tile server and the rest of the properties are the ones defined by the TileLayer options.

If the {@link type} is “wms”, the tiling layer is configured with an WebMapService server and the rest of the properties are the ones defined by the TileLayer.WMS options.

Other types of tiling layers are not supported as for now.

The {@link url} is of course the url of either the WMS server or the OSM tiling server.

The {@link options} is an object which has all properties of the respective tileLayer as defined by {@link https://leafletjs.com/reference-1.5.1.html#tilelayer-option TileLayer options} when {@link type} = “osm” or {@link https://leafletjs.com/reference-1.5.1.html#tilelayer-wms-option TileLayer.WMS options} when {@link type} = “wms”.

Properties

Typedef: GraticuleConfig

GraticuleConfig for configuring a graticule to be shown on the map.

Experimental Feature!

Currently, two graticule plug-ins are used. {@link https://github.com/turban/Leaflet.Graticule L.Graticule.js} handles polar maps better but lacks configurability and has no lat/lng labels while {@link https://github.com/Leaflet/Leaflet.Graticule leaflet.latlng-graticule} can show lat/lng labels, comes with a more flexible configurability, but cannot handle polar maps sufficiently.

Unfortunately, both plug-ins seem to be unmaintained or at least without any progress in the last years.

It is unclear wheather we have to write our own or refactor one of these plug-ins It is unclear which plug-in will make it, wheather we have to write our own or refactor one of these plug-ins.

For the time being, both can be used and the implementation is set by the {@link type} property. If unset or “simple”, the L.Graticule.js implementation is used.

If {@link type} is “latlngGraticule” the leaflet.latlng-graticule implementation is used.

The {@link options} must comply with the configuration options of the respective implementation.

Properties

  • string type: either “simple” or “latlngGraticule”.

  • object options: the options for the graticule

    implementation.

Typedef: CRSConfig

CRSConfig for the configuration of the coordinate reference system.

The CRS is managed by the {@link http://kartena.github.io/Proj4Leaflet/ Proj4Leaflet} plugin of the Leaflet.js module.

The {@link code} defines the standardized CRS Code, e.g. “EPSG:3857” for the widely used Sperical Mercator CRS.

The {@link proj4def} contains the proj4 definition of the CRS. A good soure for these definitions is {@link https://epsg.io}, e.g. {@link https://epsg.io/3857} for the Sperical Mercartor CRS.

The {@link options} defines the options for the Proj4Leaflet plug-in, see {@link http://kartena.github.io/Proj4Leaflet/api/#l-proj-crs-options Proj.CRS options}.

Properties

Typedef: EntityLayerConfig

Properties

  • string id:

  • string name:

  • string description:

  • DivIcon_options icon_options:

  • number zIndexOffset:

  • mapEntityGetter get_entities:

  • mapEntityPopupGenerator make_popup:

Typedef: _EntityLayer

The _EntityLayer object is used to pass around map overlay layers between functions. It is not part of the public API.

Properties

  • string id: The _EntityLayer object is used to pass around map overlay layers

between functions. It is not part of the public API. - HTMLElement chooser_html: The _EntityLayer object is used to pass around map overlay layers between functions. It is not part of the public API. - L.LayerGroup layer_group: The _EntityLayer object is used to pass around map overlay layers between functions. It is not part of the public API. - boolean active: The _EntityLayer object is used to pass around map overlay layers between functions. It is not part of the public API.

Typedef: ViewChangeCB