Get rid of extra style arrays in examples

This commit is contained in:
Tim Schaub
2015-11-11 18:18:41 -07:00
parent e8c99e4e63
commit 99a902a311
19 changed files with 212 additions and 242 deletions

View File

@@ -15,75 +15,63 @@ goog.require('ol.style.Style');
var styles = {
'amenity': {
'parking': [
new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(170, 170, 170, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(170, 170, 170, 0.3)'
})
'parking': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(170, 170, 170, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(170, 170, 170, 0.3)'
})
]
})
},
'building': {
'.*': [
new ol.style.Style({
zIndex: 100,
stroke: new ol.style.Stroke({
color: 'rgba(246, 99, 79, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(246, 99, 79, 0.3)'
})
'.*': new ol.style.Style({
zIndex: 100,
stroke: new ol.style.Stroke({
color: 'rgba(246, 99, 79, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(246, 99, 79, 0.3)'
})
]
})
},
'highway': {
'service': [
new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(255, 255, 255, 1.0)',
width: 2
})
'service': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(255, 255, 255, 1.0)',
width: 2
})
],
'.*': [
new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(255, 255, 255, 1.0)',
width: 3
})
}),
'.*': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(255, 255, 255, 1.0)',
width: 3
})
]
})
},
'landuse': {
'forest|grass|allotments': [
new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(140, 208, 95, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(140, 208, 95, 0.3)'
})
'forest|grass|allotments': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(140, 208, 95, 1.0)',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(140, 208, 95, 0.3)'
})
]
})
},
'natural': {
'tree': [
new ol.style.Style({
image: new ol.style.Circle({
radius: 2,
fill: new ol.style.Fill({
color: 'rgba(140, 208, 95, 1.0)'
}),
stroke: null
})
'tree': new ol.style.Style({
image: new ol.style.Circle({
radius: 2,
fill: new ol.style.Fill({
color: 'rgba(140, 208, 95, 1.0)'
}),
stroke: null
})
]
})
}
};