Merge pull request #4535 from ahocevar/osm-example-style

Do not use an array for a single style
This commit is contained in:
Andreas Hocevar
2015-12-09 10:50:31 +01:00

View File

@@ -18,8 +18,7 @@ var roadColor = {
'highway': '#f39' 'highway': '#f39'
}; };
var landuseStyleCache = {}; var landuseStyleCache = {};
var buildingStyle = [ var buildingStyle = new ol.style.Style({
new ol.style.Style({
fill: new ol.style.Fill({ fill: new ol.style.Fill({
color: '#666', color: '#666',
opacity: 0.4 opacity: 0.4
@@ -28,8 +27,7 @@ var buildingStyle = [
color: '#444', color: '#444',
width: 1 width: 1
}) })
}) });
];
var map = new ol.Map({ var map = new ol.Map({
layers: [ layers: [