Make stroke style of the graticule configurable

This commit is contained in:
Marc Jansen
2014-07-25 12:03:43 +02:00
committed by Éric Lemoine
parent b8dca21286
commit b60609d93c
4 changed files with 54 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.proj');
goog.require('ol.source.OSM');
goog.require('ol.style.Stroke');
var map = new ol.Map({
@@ -21,5 +22,12 @@ var map = new ol.Map({
});
// Create the graticule component
var graticule = new ol.Graticule();
var graticule = new ol.Graticule({
// the style to use for the lines, optional.
strokeStyle: new ol.style.Stroke({
color: 'rgba(255,120,0,0.9)',
width: 2,
lineDash: [0.5, 4]
})
});
graticule.setMap(map);