Skip to content

Layer parameters

jmacura edited this page Feb 5, 2021 · 41 revisions

Layer

We extend the OpenLayers' Layer definition object with the following parametres:

  • abstract: String - abstract information about the layer
  • active: Boolean (TODO: describe)
  • Attribution: Object - object of type (TODO: rename to attribution)
    • LogoURL: Object - containing image format and URL path to the image (TODO: logoUrl)
      • Format: String - image format (TODO: rename to format)
      • OnlineResource: String - image URL path (TODO: rename to onlineResource)
    • OnlineResource: String - URL to resource domain (TODO: rename to onlineResource)
    • Title: String - attribution title (TODO: rename to title)
  • base: Boolean - layer will act as base layer for the map
  • BoundingBox: Array<object>| Array<number> (TODO: rename to boundingBox)
  • cluster: Boolean - layer containing features will be grouped into clusters based on the viewing distance
  • Copyright (TODO: Remove since Attribution does the same thing)
  • customInfoTemplate: String (TODO: describe)
  • declutter: Boolean - layer containing features that will overlap will be hidden based on the viewing distance
  • definition: Object - object of type (TODO: describe)
    • format: String
    • url: String
  • dimensions: Object - object of type
    • time: Object - object of type
      • value: Date (TODO: can't be Date because of "Expression has changed after it was checked" error)
      • values
      • type: 'date' | 'datetime'
      • format
      • default
  • dimensions_time: Object | Array<Object> (TODO: remove in favor of dimensions.time which is more in line with WMS-T spec)
  • editor: Object - object of type
    • editable: Boolean
    • defaultAttributes - directory of attribute names as keys and values describing the default values to be set for new features.
  • enableProxy: Boolean
  • events-suspended: Number (readonly) (TODO: rename to eventsSuspended)
  • exclusive: Boolean
  • featureInfoLang
  • from_composition: Boolean - layer loaded from composition (TODO rename to fromComposition)
  • getFeatureInfoTarget: String - name of the component responsible for displaying layer information. If we want the results be displayed in hslayers Info panel then set getFeatureInfoTarget='info-panel', otherwise the element will be searched using this query 'ol-popup ' + layer.get('popupClass')
  • hsFilters - (TODO: Remove since not used anywhere)
  • hsOriginalStyle (readonly) - Holds original Openlayers Style object or function which is used in feature clusters when theres only one feature in cluster or as layer style when clustering is turned off)
  • hs-layman-synchronizing: Boolean (readonly) Used internally to display loading icon while features are synchronized with Laymans WFS endpoint.
  • img - Image to display for OL Group defined in HsConfig.box_layers (TODO: Deprecate in favor of 'thumbnail')
  • info_format (TODO: rename to infoFormat)
  • inlineLegend: Boolean - layer legend will be visible inside layer editor tab
  • Layer- names of sublayers in case of WMS (sub-layer) (TODO: rename to sublayers and remove layer.hasSublayers since it shadows this functionality, see this.setOrUpdate(layer, 'Layer', layers); this.setOrUpdate(layer, 'Legends', legends); this.setOrUpdate(layer, 'MetadataURL')
  • laymanLayerDescriptor: HsLaymanLayerDescriptor
  • legendImage: SafeResourceUrl - URL to static legend image (TODO: deprecate in favor of 'legends' array, but keep backwards compatibility with a warning)
  • legends: Array<String> - array of legend URLs (Explore how it relates to styles and if we need a more complex structure because legends map to wms layer styles where there can be more than one and with a specific name. see: this.setOrUpdate(layer, 'Layer', layers); this.setOrUpdate(layer, 'Legends', legends); this.setOrUpdate(layer, 'MetadataURL')
  • manuallyAdded: Boolean (readonly) (TODO: Remove this and connected functionality)
  • MaxScaleDenominator: Number (TODO: rename to maxResolutionDenominator)
  • metadata: Object - URL to layers metadata
  • Metadata: String - URL to layers metadata (TODO: merge into 'metadata')
  • MetadataURL: String - URL to layers metadata (TODO: merge into 'metadata')
  • minimumTerrainLevel: Number - Used in cesium to display layer only from certain terrain level (we can use minResolution because the surface can be looked uppon from an angle)
  • minScale: Number (TODO: remove)
  • maxScale: Number (TODO: remove)
  • name: String
  • onFeatureSelected: Function - custom action for clicked feature on the map
  • path: String
  • popUp: Object - object of type
    • attributes: Array<String> | Array<Object> - containing either names of attributes to display or objects of type
      • attribute: String - name of the attribute
      • displayFunction?: Function - alternative function to format the attribute value
      • label?: String - alternative label to display instead of the attribute name
  • popupClass
  • position (TODO: remove)
  • queryable: Boolean
  • queryCapabilities: Boolean
  • queryFilter
  • removable: Boolean
  • saveState (TODO: remove to reduce complexity. We can check if the layer should not be saved during page reloads by comparing references to the actuall layer objects in our internal layers (query point layer, measuring layer etc.)
  • show_in_manager: Boolean - layer is visible inside Layermanager panel (TODO: rename to showInLayerManager)
  • sublayers: Array<Object> - array of layer sub-layers (TODO: Leave it but merge 'Layers' attribute into this because they seem to be doing the same thing)
  • thumbnail: Object - object of type
  • title: String - layer title
  • virtualAttributes: Object

Feature

Additionally, we extend OpenLayers' Feature with these parametres:

  • features: Array<Feature> - array of features when the source is clustered, undefined otherwise
  • highlighted: Boolean - feature is currently selected
  • hstemplate: (TODO: deprecate or create the custom template functionality since, it's not supported currently)
  • is_hs_composition_extent: Boolean (TODO: Remove and check by layer instead)
  • label: String
  • name: String
  • record
  • title: String
  • unit_id: String | Number - sensor unit identity (TODO: rename to unitId)
  • wp: Waypoint

Source

Additionally, we extend OpenLayers' Source with these parametres:

  • loaded: Boolean
Clone this wiki locally