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

Possible to override the default symbology #37

Open
Gustry opened this issue Jun 16, 2023 · 0 comments
Open

Possible to override the default symbology #37

Gustry opened this issue Jun 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Gustry
Copy link
Member

Gustry commented Jun 16, 2023

For now, the symbology is hard-coded in the JS files :

new Style({
stroke: new Stroke({
color: 'black',
width: 11,
}),
}),
new Style({
stroke: new Stroke({
color: 'purple',
width: 9,
}),
}),
];
geometry.forEachSegment((start, end) => {
const dx = end[0] - start[0];
const dy = end[1] - start[1];
const rotation = Math.atan2(dy, dx);
// arrows
styles.push(
new Style({
geometry: new Point(end),
text: new Text({
text: '>',
font: 'normal 16px sans-serif',
rotateWithView: true,
rotation: -rotation,
stroke: new Stroke({
color: 'white',
width: 2,
}),
fill: new Fill({
color: 'white',
})

It would be nice to have the possibility to override these default symbology for the Lizmap administrator.

@Gustry Gustry added the enhancement New feature or request label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant