Skip to content

Commit

Permalink
Merge pull request #94 from jansule/unsupported-features
Browse files Browse the repository at this point in the history
Add definition for unsupportedProperties
  • Loading branch information
jansule authored Jan 8, 2019
2 parents a624ed1 + 444e3b5 commit 39d72c4
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export interface TextSymbolizer extends BasePointSymbolizer {
}

/**
* A FillSymbolizer describes the style representation of POINT data if styled with
* An IconSymbolizer describes the style representation of POINT data if styled with
* an specific icon.
*/
export interface IconSymbolizer extends BasePointSymbolizer {
Expand Down Expand Up @@ -195,7 +195,6 @@ export interface IconSymbolizer extends BasePointSymbolizer {
export interface FillSymbolizer extends BaseSymbolizer {
kind: 'Fill';
antialias?: boolean;
fillPattern?: string;
outlineColor?: string;
outlineWidth?: number;
outlineDasharray?: number[];
Expand All @@ -221,11 +220,8 @@ export interface LineSymbolizer extends BaseSymbolizer {
graphicFill?: PointSymbolizer;
join?: 'bevel' | 'round' | 'miter';
miterLimit?: number;
// TODO check if offset is being used somewhere, or if perpendicularOffset and dashOffset already replace it
offset?: number;
perpendicularOffset?: number;
dashOffset?: number;
pattern?: string;
roundLimit?: number;
type?: string;
width?: number;
Expand Down Expand Up @@ -260,6 +256,33 @@ export interface Style {
rules: Rule[];
}

/**
* Interface for defining unsupported properties in the parsers.
* Value of each property must either be 'undefined', or an object whose (sub-)subproperties have the value 'undefined'.
*/
export interface UnsupportedProperties {
ScaleDenominator?: 'unsupported';
Filter?: {
'&&'?: 'unsupported';
'!'?: 'unsupported';
'||'?: 'unsupported';
'>'?: 'unsupported';
'>='?: 'unsupported';
'=='?: 'unsupported';
'<'?: 'unsupported';
'<='?: 'unsupported';
'!='?: 'unsupported';
'*='?: 'unsupported';
};
Symbolizer?: {
PointSymbolizer?: any;
LineSymbolizer?: any;
FillSymbolizer?: any;
MarkSymbolizer?: any;
IconSymbolizer?: any;
}
}

/**
* Interface, which has to be implemented by all GeoStyler style parser classes.
*/
Expand Down Expand Up @@ -339,6 +362,12 @@ export interface StyleParser {
* @param geoStylerSymbolizer Symbolizer
*/
writeSymbolizer?(geoStylerSymbolizer: Symbolizer): Promise<any>;

/**
* Object specifying which properties are not supported. MUST be a static
* class attribute.
*/
unsupportedProperties?: UnsupportedProperties;
}

export interface StyleParserConstructable extends StyleParser {
Expand Down

0 comments on commit 39d72c4

Please sign in to comment.