Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getStyle(feature, resolution) {
- var color = "green";
- const name = feature.get("name");
- if (name.startsWith("A ")) color = "blue";
- else if (name.startsWith("L ")) color = "red";
- return new ol.style.Style({
- stroke: new ol.style.Stroke({
- color: color,
- width: 2
- })
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement