Merge pull request #4535 from ahocevar/osm-example-style
Do not use an array for a single style
This commit is contained in:
@@ -18,18 +18,16 @@ 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
|
}),
|
||||||
}),
|
stroke: new ol.style.Stroke({
|
||||||
stroke: new ol.style.Stroke({
|
color: '#444',
|
||||||
color: '#444',
|
width: 1
|
||||||
width: 1
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
];
|
});
|
||||||
|
|
||||||
var map = new ol.Map({
|
var map = new ol.Map({
|
||||||
layers: [
|
layers: [
|
||||||
|
|||||||
Reference in New Issue
Block a user