ultimap
Version:
Universal map api
21 lines (17 loc) • 622 B
text/typescript
import {
ICreatePolygonPresetProperties,
IPolygonPresetProperties,
IPolygonPresetStrategy,
} from '../../interface/preset/polygon';
import { polygonPresetStorge } from '../utils/polygon-preset-storge';
export class LeafletPolygonPresetStrategy implements IPolygonPresetStrategy {
public create(preset: string, props: ICreatePolygonPresetProperties): IPolygonPresetStrategy {
polygonPresetStorge.add(preset, {
style: props.style,
});
return this;
}
public get(preset: string): IPolygonPresetProperties {
return polygonPresetStorge.get(preset);
}
}