-
-
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.
Merge pull request #787 from KaiVolland/sprite
Add support for geostyler Sprite
- Loading branch information
Showing
7 changed files
with
213 additions
and
201 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,13 @@ | ||
import OlStyle from 'ol/style/Style'; | ||
import OlStyleIcon from 'ol/style/Icon'; | ||
|
||
const olIconSpritePoint = new OlStyle({ | ||
image: new OlStyleIcon({ | ||
src: 'https://testurl.com/sprites/mysprite', | ||
offset: [20, 20], | ||
offsetOrigin: 'top-left', | ||
size: [10, 10] | ||
}) | ||
}); | ||
|
||
export default olIconSpritePoint; |
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 { Style } from 'geostyler-style'; | ||
|
||
const pointSpritePoint: Style = { | ||
name: 'OL Style', | ||
rules: [ | ||
{ | ||
name: 'OL Style Rule 0', | ||
symbolizers: [{ | ||
kind: 'Icon', | ||
image: { | ||
source: 'https://testurl.com/sprites/mysprite', | ||
position: [20, 20], | ||
size: [10, 10] | ||
}, | ||
size: 10 | ||
}] | ||
} | ||
] | ||
}; | ||
|
||
export default pointSpritePoint; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.