-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parse placement of TextSymbolizer
* fix: check if font is undefined * feat: parse placement of TextSymbolizer * Update src/OlStyleParser.spec.ts Co-authored-by: Jan Suleiman <jansule@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Jan Suleiman <jansule@users.noreply.github.com> --------- Co-authored-by: Faouzi Homsani <homsani@terrestris.de> Co-authored-by: Jan Suleiman <jansule@users.noreply.github.com>
- Loading branch information
1 parent
af56c7d
commit 59944a7
Showing
9 changed files
with
195 additions
and
6 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,14 @@ | ||
import OlStyleText from 'ol/style/Text'; | ||
import OlStyle from 'ol/style/Style'; | ||
import OlStyleStroke from 'ol/style/Stroke'; | ||
const olTextPlacementStyle = new OlStyle({ | ||
text: new OlStyleText({ | ||
text: 'name', | ||
placement:'line', | ||
stroke: new OlStyleStroke({ | ||
width: 5 | ||
}) | ||
}) | ||
}); | ||
|
||
export default olTextPlacementStyle; |
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,14 @@ | ||
import OlStyleText from 'ol/style/Text'; | ||
import OlStyle from 'ol/style/Style'; | ||
import OlStyleStroke from 'ol/style/Stroke'; | ||
const olTextPlacementStyle = new OlStyle({ | ||
text: new OlStyleText({ | ||
text: 'name', | ||
placement:'point', | ||
stroke: new OlStyleStroke({ | ||
width: 5 | ||
}) | ||
}) | ||
}); | ||
|
||
export default olTextPlacementStyle; |
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,27 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const textStyle: Style = { | ||
name: 'OL Style', | ||
rules: [ | ||
{ | ||
name: 'OL Style Rule 0', | ||
symbolizers: [{ | ||
kind: 'Text', | ||
placement:'line-center', | ||
allowOverlap: undefined, | ||
fontStyle: undefined, | ||
fontWeight: undefined, | ||
color: '#333', | ||
label: 'name', | ||
font: undefined, | ||
size: undefined, | ||
offset: [0,0], | ||
haloColor: undefined, | ||
haloWidth: 5, | ||
rotate: undefined | ||
}] | ||
} | ||
] | ||
}; | ||
|
||
export default textStyle; |
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,27 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const textStyle: Style = { | ||
name: 'OL Style', | ||
rules: [ | ||
{ | ||
name: 'OL Style Rule 0', | ||
symbolizers: [{ | ||
kind: 'Text', | ||
placement:'line', | ||
allowOverlap: undefined, | ||
fontStyle: undefined, | ||
fontWeight: undefined, | ||
color: '#333', | ||
label: 'name', | ||
font: undefined, | ||
size: undefined, | ||
offset: [0,0], | ||
haloColor: undefined, | ||
haloWidth: 5, | ||
rotate: undefined | ||
}] | ||
} | ||
] | ||
}; | ||
|
||
export default textStyle; |
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,27 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const textStyle: Style = { | ||
name: 'OL Style', | ||
rules: [ | ||
{ | ||
name: 'OL Style Rule 0', | ||
symbolizers: [{ | ||
kind: 'Text', | ||
placement:'point', | ||
allowOverlap: undefined, | ||
fontStyle: undefined, | ||
fontWeight: undefined, | ||
color: '#333', | ||
label: 'name', | ||
font: undefined, | ||
size: undefined, | ||
offset: [0,0], | ||
haloColor: undefined, | ||
haloWidth: 5, | ||
rotate: undefined | ||
}] | ||
} | ||
] | ||
}; | ||
|
||
export default textStyle; |
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