Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add definition for unsupportedProperties #94

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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