Skip to content

Commit

Permalink
update StyleType and add RasterSample
Browse files Browse the repository at this point in the history
  • Loading branch information
jansule committed Mar 21, 2019
1 parent 76e8733 commit d1e9493
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ScaleDenominator {
/**
* The type of the Style.
*/
export type StyleType = 'Point' | 'Fill' | 'Line';
export type StyleType = 'Point' | 'Fill' | 'Line' | 'Raster';

/**
* The possible Operator used for comparison Filters.
Expand Down
39 changes: 39 additions & 0 deletions rastersample.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Style } from 'index';

const sampleRasterStyle: Style = {
name: 'Sample Raster Style',
rules: [
{
name: 'Very old Peter',
filter: ['&&',
['==', 'name', 'Peter'],
['>=', 'age', 51]
],
scaleDenominator: {
min: 500,
max: 1000
},
symbolizers: [{
kind: 'Raster',
opacity: 1,
colorMap: {
colorMapEntries: [
{
color: '#00FFFF',
quantity: 100
}
],
extended: false,
type: 'ramp'
},
channelSelection: {
grayChannel: {
sourceChannelName: '1'
}
}
}]
}
]
};

export default sampleRasterStyle;

0 comments on commit d1e9493

Please sign in to comment.