Skip to content

Commit

Permalink
Style in example
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Mar 8, 2013
1 parent 77355ca commit 5ce114c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/vector-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ goog.require('ol.parser.GeoJSON');
goog.require('ol.projection');
goog.require('ol.source.MapQuestOpenAerial');
goog.require('ol.source.Vector');
goog.require('ol.style.Polygon');
goog.require('ol.style.Rule');
goog.require('ol.style.Style');


var raster = new ol.layer.TileLayer({
Expand All @@ -21,7 +24,18 @@ var raster = new ol.layer.TileLayer({
var vector = new ol.layer.Vector({
source: new ol.source.Vector({
projection: ol.projection.getFromCode('EPSG:4326')
})
}),
style: new ol.style.Style({rules: [
new ol.style.Rule({
symbolizers: [
new ol.style.Polygon({
strokeStyle: '#696969',
strokeWidth: 1,
opacity: 1.5
})
]
})
]})
});

var geojson = new ol.parser.GeoJSON();
Expand Down

0 comments on commit 5ce114c

Please sign in to comment.