import Feature from 'ol/Feature' ; import { Geometry } from 'ol/geom' ; const TITLE = 'title' ; const HIGHLIGHTED = 'highlighted' ; const LABEL = 'label' ; const NAME = 'name' ; const FEATURES = 'features' ; const UNITID = 'unitId' ; export function setFeatureTitle ( feature , title ) { feature . set ( TITLE , title ) ; } export function getFeatureTitle ( feature ) { return feature . get ( TITLE ) ; } export function setHighlighted ( feature , highlighted ) { feature . set ( HIGHLIGHTED , highlighted ) ; } export function getHighlighted ( feature ) { return feature . get ( HIGHLIGHTED ) ; } export function setFeatureLabel ( feature , label ) { feature . set ( LABEL , label ) ; } export function getFeatureLabel ( feature ) { return feature . get ( LABEL ) ; } export function setFeatureName ( feature , name ) { feature . set ( NAME , name ) ; } export function getFeatureName ( feature ) { return feature . get ( NAME ) ; } export function setFeatures ( feature , features ) { feature . set ( FEATURES , features ) ; } export function getFeatures ( feature ) { return feature . get ( FEATURES ) ; } export function setUnitId ( feature , unitId ) { feature . set ( UNITID , unitId ) ; } export function getUnitId ( feature ) { return feature . get ( UNITID ) ; } export const HsFeatureExt = { setFeatureTitle , getFeatureTitle , setHighlighted , getHighlighted , setFeatureLabel , getFeatureLabel , setFeatureName , getFeatureName , setFeatures , getFeatures , setUnitId , getUnitId , } ;