Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from geostyler/beta-4
Merge beta branch into master
- Loading branch information
Showing
58 changed files
with
3,274 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const expression_case: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Expression Case', | ||
layers: [ | ||
{ | ||
id: 'earthquake_circle', | ||
type: 'circle', | ||
paint: { | ||
'circle-color': [ | ||
'case', | ||
['<', ['get', 'mag'], 2], | ||
'#fed976', | ||
['all', ['>=', ['get', 'mag'], 2], ['<', ['get', 'mag'], 3]], | ||
'#feb24c', | ||
['all', ['>=', ['get', 'mag'], 3], ['<', ['get', 'mag'], 4]], | ||
'#fd8d3c', | ||
['all', ['>=', ['get', 'mag'], 4], ['<', ['get', 'mag'], 5]], | ||
'#fc4e2a', | ||
'#e31a1c' | ||
], | ||
'circle-opacity': 0.6, | ||
'circle-radius': 12 | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export default expression_case; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const expression_get: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Expression Get', | ||
layers: [ | ||
{ | ||
id: 'Expression Get', | ||
type: 'circle', | ||
paint: { | ||
'circle-color': '#000000', | ||
'circle-radius': ['get', 'population'], | ||
'circle-opacity': ['get', 'population_density'], | ||
'circle-stroke-width': 2, | ||
'circle-stroke-color': '#FF0000', | ||
'circle-stroke-opacity': 0.5 | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export default expression_get; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const fillSimpleFillOutline: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Simple Fill With outline', | ||
layers: [{ | ||
id: 'r0_sy0_st0', | ||
type: 'fill', | ||
paint: { | ||
'fill-color': '#ff0000' | ||
} | ||
}, | ||
{ | ||
id: 'r0_sy0_st1', | ||
type: 'line', | ||
paint: { | ||
'line-opacity': 0.5, | ||
'line-color': '#00ff00', | ||
'line-width': 2 | ||
}, | ||
layout: { | ||
'line-cap': 'butt', | ||
'line-join': 'round' | ||
} | ||
}] | ||
}; | ||
|
||
export default fillSimpleFillOutline; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const lineSimpleLine: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Simple Line Filter', | ||
layers: [{ | ||
id: 'Small populated New Yorks', | ||
type: 'line', | ||
paint: { | ||
'line-color': '#FF0000', | ||
'line-width': ['case', | ||
['==', 'DENSITY', 20], | ||
3, | ||
['!=', 'DENSITY', 20], | ||
5 | ||
] | ||
} | ||
}] | ||
}; | ||
|
||
export default lineSimpleLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const circleSimpleCircle: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Simple Circle', | ||
layers: [ | ||
{ | ||
id: 'r0_sy0_st0', | ||
type: 'circle', | ||
paint: { | ||
'circle-color': '#000000', | ||
'circle-radius': 5, | ||
'circle-opacity': 1, | ||
'circle-stroke-width': 2, | ||
'circle-stroke-color': '#FF0000', | ||
'circle-stroke-opacity': 0.5 | ||
} | ||
} | ||
], | ||
metadata: { | ||
'geostyler:ref': { | ||
rules: [{ | ||
name: 'Simple Circle', | ||
symbolizers: [ | ||
[ | ||
'r0_sy0_st0' | ||
] | ||
] | ||
}] | ||
} | ||
} | ||
}; | ||
|
||
export default circleSimpleCircle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MbStyle } from '../../src/MapboxStyleParser'; | ||
|
||
const expression_case: Omit<MbStyle, 'sources'> = { | ||
version: 8, | ||
name: 'Expression Case', | ||
layers: [ | ||
{ | ||
id: 'r0_sy0_st0', | ||
type: 'circle', | ||
paint: { | ||
'circle-color': [ | ||
'case', | ||
['<', ['get', 'mag'], 2], | ||
'#fed976', | ||
['all', ['>=', ['get', 'mag'], 2], ['<', ['get', 'mag'], 3]], | ||
'#feb24c', | ||
['all', ['>=', ['get', 'mag'], 3], ['<', ['get', 'mag'], 4]], | ||
'#fd8d3c', | ||
['all', ['>=', ['get', 'mag'], 4], ['<', ['get', 'mag'], 5]], | ||
'#fc4e2a', | ||
'#e31a1c' | ||
], | ||
'circle-opacity': 0.6, | ||
'circle-radius': 12 | ||
} | ||
} | ||
], | ||
metadata: { | ||
'geostyler:ref': { | ||
rules: [{ | ||
name: 'earthquake_circle', | ||
symbolizers: [ | ||
[ | ||
'r0_sy0_st0' | ||
] | ||
] | ||
}] | ||
} | ||
} | ||
}; | ||
|
||
export default expression_case; |
Oops, something went wrong.