Created
February 6, 2021 12:33
-
-
Save iamgeoknight/3c701280156276596b4ac826e4592db9 to your computer and use it in GitHub Desktop.
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
/* | |
Create Vector Layer | |
*/ | |
class VectorLayer{ | |
//Constructor accepts title of vector layer and map object | |
constructor(title, map) { | |
this.layer = new ol.layer.Vector({ | |
title: title, | |
source: new ol.source.Vector({ | |
projection:map.getView().projection | |
}), | |
style: new ol.style.Style({ | |
stroke: new ol.style.Stroke({ | |
color: '#0e97fa', | |
width:4 | |
}) | |
}) | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment