Last active
January 9, 2022 05:37
-
-
Save iamgeoknight/71ec974c69ed58d11550b917ed87bf25 to your computer and use it in GitHub Desktop.
Static Style
This file contains hidden or 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
// Defining Static Style | |
let staticStyle = new ol.style.Style({ | |
// Line and Polygon Style | |
stroke: new ol.style.Stroke({ | |
color: '#0e97fa', | |
width: 4 | |
}), | |
fill: new ol.style.Fill({ | |
color: 'rgba(0, 153, 255, 0.2)' | |
}), | |
// Point Style | |
image: new ol.style.Circle({ | |
radius: 10, | |
fill: new ol.style.Fill({ | |
color: [0, 153, 255, 1], | |
}), | |
stroke: new ol.style.Stroke({ | |
color: [255, 255, 255, 1], | |
width: 5 | |
}), | |
}) | |
}); | |
//Set static style for vector layer | |
vector_layer.setStyle(staticStyle); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment