Layer parameters - hslayers/hslayers-ng Wiki

Layer

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

{
   "cz": {
       "LAYERS": {
          "<layer_title_in_english>": "<layer_title_in_czech>"
      }
   }    
}
layer.set('virtualAttributes', {
        area: function(feature: Feature){
          const geom = feature.getGeometry();
          if(geom){
            return (getArea(geom) / 10000).toFixed(2) + 'ha';
          } else {
            return '';
          }
        })

Feature

Additionally, we extend OpenLayers' Feature with these parametres:

Source

Additionally, we extend OpenLayers' Source with these parametres: