Rename _ol_style_Fill_ to Fill

This commit is contained in:
Tim Schaub
2018-01-11 13:23:27 -07:00
parent 4f4c90fc20
commit dc6ae2293d
65 changed files with 268 additions and 268 deletions

View File

@@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ var redLayer = new VectorLayer({
}), }),
style: new Style({ style: new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.8)' color: 'rgba(255,0,0,0.8)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -38,7 +38,7 @@ var greenLayer = new VectorLayer({
}), }),
style: new Style({ style: new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,255,0,0.8)' color: 'rgba(0,255,0,0.8)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -55,7 +55,7 @@ var blueLayer = new VectorLayer({
}), }),
style: new Style({ style: new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,255,0.8)' color: 'rgba(0,0,255,0.8)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -6,7 +6,7 @@ import _ol_has_ from '../src/ol/has.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -57,7 +57,7 @@ var pattern = (function() {
}()); }());
// Generate style for gradient or pattern fill // Generate style for gradient or pattern fill
var fill = new _ol_style_Fill_(); var fill = new Fill();
var style = new Style({ var style = new Style({
fill: fill, fill: fill,
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -16,7 +16,7 @@ var source = new VectorSource({
format: new GeoJSON() format: new GeoJSON()
}); });
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -25,7 +25,7 @@ var style = new Style({
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -8,7 +8,7 @@ import Cluster from '../src/ol/source/Cluster.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
@@ -46,13 +46,13 @@ var clusters = new VectorLayer({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: '#fff' color: '#fff'
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#3399CC' color: '#3399CC'
}) })
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
text: size.toString(), text: size.toString(),
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#fff' color: '#fff'
}) })
}) })

View File

@@ -11,7 +11,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import TileJSON from '../src/ol/source/TileJSON.js'; import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -168,7 +168,7 @@ var map = new Map({
width: 3, width: 3,
color: [255, 0, 0, 1] color: [255, 0, 0, 1]
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: [0, 0, 255, 0.6] color: [0, 0, 255, 0.6]
}) })
}) })

View File

@@ -12,7 +12,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ import Style from '../src/ol/style/Style.js';
var defaultStyle = { var defaultStyle = {
'Point': new Style({ 'Point': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,255,0,0.5)' color: 'rgba(255,255,0,0.5)'
}), }),
radius: 5, radius: 5,
@@ -37,7 +37,7 @@ var defaultStyle = {
}) })
}), }),
'Polygon': new Style({ 'Polygon': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,255,255,0.5)' color: 'rgba(0,255,255,0.5)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -47,7 +47,7 @@ var defaultStyle = {
}), }),
'MultiPoint': new Style({ 'MultiPoint': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,255,0.5)' color: 'rgba(255,0,255,0.5)'
}), }),
radius: 5, radius: 5,
@@ -64,7 +64,7 @@ var defaultStyle = {
}) })
}), }),
'MultiPolygon': new Style({ 'MultiPolygon': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,255,0.5)' color: 'rgba(0,0,255,0.5)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -12,7 +12,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ import Style from '../src/ol/style/Style.js';
var defaultStyle = { var defaultStyle = {
'Point': new Style({ 'Point': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,255,0,0.5)' color: 'rgba(255,255,0,0.5)'
}), }),
radius: 5, radius: 5,
@@ -37,7 +37,7 @@ var defaultStyle = {
}) })
}), }),
'Polygon': new Style({ 'Polygon': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,255,255,0.5)' color: 'rgba(0,255,255,0.5)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -47,7 +47,7 @@ var defaultStyle = {
}), }),
'MultiPoint': new Style({ 'MultiPoint': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,255,0.5)' color: 'rgba(255,0,255,0.5)'
}), }),
radius: 5, radius: 5,
@@ -64,7 +64,7 @@ var defaultStyle = {
}) })
}), }),
'MultiPolygon': new Style({ 'MultiPolygon': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,255,0.5)' color: 'rgba(0,0,255,0.5)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ var source = new VectorSource();
var vector = new VectorLayer({ var vector = new VectorLayer({
source: source, source: source,
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)' color: 'rgba(255, 255, 255, 0.2)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -29,7 +29,7 @@ var vector = new VectorLayer({
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#ffcc33' color: '#ffcc33'
}) })
}) })

View File

@@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -27,7 +27,7 @@ var imageStyle = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
snapToPixel: false, snapToPixel: false,
fill: new _ol_style_Fill_({color: 'yellow'}), fill: new Fill({color: 'yellow'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1}) stroke: new _ol_style_Stroke_({color: 'red', width: 1})
}) })
}); });
@@ -36,7 +36,7 @@ var headInnerImageStyle = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 2, radius: 2,
snapToPixel: false, snapToPixel: false,
fill: new _ol_style_Fill_({color: 'blue'}) fill: new Fill({color: 'blue'})
}) })
}); });
@@ -44,7 +44,7 @@ var headOuterImageStyle = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
snapToPixel: false, snapToPixel: false,
fill: new _ol_style_Fill_({color: 'black'}) fill: new Fill({color: 'black'})
}) })
}); });

View File

@@ -10,28 +10,28 @@ import Cluster from '../src/ol/source/Cluster.js';
import Stamen from '../src/ol/source/Stamen.js'; import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
var earthquakeFill = new _ol_style_Fill_({ var earthquakeFill = new Fill({
color: 'rgba(255, 153, 0, 0.8)' color: 'rgba(255, 153, 0, 0.8)'
}); });
var earthquakeStroke = new _ol_style_Stroke_({ var earthquakeStroke = new _ol_style_Stroke_({
color: 'rgba(255, 204, 0, 0.2)', color: 'rgba(255, 204, 0, 0.2)',
width: 1 width: 1
}); });
var textFill = new _ol_style_Fill_({ var textFill = new Fill({
color: '#fff' color: '#fff'
}); });
var textStroke = new _ol_style_Stroke_({ var textStroke = new _ol_style_Stroke_({
color: 'rgba(0, 0, 0, 0.6)', color: 'rgba(0, 0, 0, 0.6)',
width: 3 width: 3
}); });
var invisibleFill = new _ol_style_Fill_({ var invisibleFill = new Fill({
color: 'rgba(255, 255, 255, 0.01)' color: 'rgba(255, 255, 255, 0.01)'
}); });
@@ -88,7 +88,7 @@ function styleFunction(feature, resolution) {
style = new Style({ style = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: feature.get('radius'), radius: feature.get('radius'),
fill: new _ol_style_Fill_({ fill: new Fill({
color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))] color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))]
}) })
}), }),

View File

@@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_render_ from '../src/ol/render.js'; import _ol_render_ from '../src/ol/render.js';
import Stamen from '../src/ol/source/Stamen.js'; import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -36,7 +36,7 @@ var styleFunction = function(feature) {
/** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')), /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')),
{size: [size, size], pixelRatio: 1}); {size: [size, size], pixelRatio: 1});
vectorContext.setStyle(new Style({ vectorContext.setStyle(new Style({
fill: new _ol_style_Fill_({color: 'rgba(255, 153, 0, 0.4)'}), fill: new Fill({color: 'rgba(255, 153, 0, 0.4)'}),
stroke: new _ol_style_Stroke_({color: 'rgba(255, 204, 0, 0.2)', width: 2}) stroke: new _ol_style_Stroke_({color: 'rgba(255, 204, 0, 0.2)', width: 2})
})); }));
vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)])); vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)]));

View File

@@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -100,7 +100,7 @@ var styles = {
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
snapToPixel: false, snapToPixel: false,
fill: new _ol_style_Fill_({color: 'black'}), fill: new Fill({color: 'black'}),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: 'white', width: 2 color: 'white', width: 2
}) })

View File

@@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -44,7 +44,7 @@ var styles = {
color: 'yellow', color: 'yellow',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 0, 0.1)' color: 'rgba(255, 255, 0, 0.1)'
}) })
}), }),
@@ -54,7 +54,7 @@ var styles = {
lineDash: [4], lineDash: [4],
width: 3 width: 3
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 0, 255, 0.1)' color: 'rgba(0, 0, 255, 0.1)'
}) })
}), }),
@@ -63,7 +63,7 @@ var styles = {
color: 'magenta', color: 'magenta',
width: 2 width: 2
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'magenta' color: 'magenta'
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
@@ -79,7 +79,7 @@ var styles = {
color: 'red', color: 'red',
width: 2 width: 2
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.2)' color: 'rgba(255,0,0,0.2)'
}) })
}) })

View File

@@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -70,7 +70,7 @@ var positionFeature = new Feature();
positionFeature.setStyle(new Style({ positionFeature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 6, radius: 6,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#3399CC' color: '#3399CC'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ var raster = new TileLayer({
var style = { var style = {
'Point': new Style({ 'Point': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,255,0,0.4)' color: 'rgba(255,255,0,0.4)'
}), }),
radius: 5, radius: 5,

View File

@@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -181,7 +181,7 @@ var featureOverlay = new VectorLayer({
style: new Style({ style: new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.9)' color: 'rgba(255,0,0,0.9)'
}) })
}) })

View File

@@ -3,14 +3,14 @@ import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -49,7 +49,7 @@ var featureOverlay = new VectorLayer({
color: '#f00', color: '#f00',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.1)' color: 'rgba(255,0,0,0.1)'
}) })
}) })

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import Stamen from '../src/ol/source/Stamen.js'; import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -24,7 +24,7 @@ var styleFunction = function(feature) {
style = new Style({ style = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: radius, radius: radius,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 153, 0, 0.4)' color: 'rgba(255, 153, 0, 0.4)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import Stamen from '../src/ol/source/Stamen.js'; import Stamen from '../src/ol/source/Stamen.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -36,7 +36,7 @@ var styleFunction = function(feature) {
} }
var opacity = 0.75 * (1 - delta / 12); var opacity = 0.75 * (1 - delta / 12);
return new Style({ return new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: [0xff, 0xff, 0x33, opacity] color: [0xff, 0xff, 0x33, opacity]
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -15,7 +15,7 @@ var stroke = new _ol_style_Stroke_({color: 'black', width: 1});
var styles = { var styles = {
'square': new Style({ 'square': new Style({
image: new _ol_style_RegularShape_({ image: new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({color: 'blue'}), fill: new Fill({color: 'blue'}),
stroke: stroke, stroke: stroke,
points: 4, points: 4,
radius: 80, radius: 80,
@@ -24,7 +24,7 @@ var styles = {
}), }),
'triangle': new Style({ 'triangle': new Style({
image: new _ol_style_RegularShape_({ image: new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({color: 'red'}), fill: new Fill({color: 'red'}),
stroke: stroke, stroke: stroke,
points: 3, points: 3,
radius: 80, radius: 80,
@@ -34,7 +34,7 @@ var styles = {
}), }),
'star': new Style({ 'star': new Style({
image: new _ol_style_RegularShape_({ image: new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({color: 'green'}), fill: new Fill({color: 'green'}),
stroke: stroke, stroke: stroke,
points: 5, points: 5,
radius: 80, radius: 80,

View File

@@ -4,7 +4,7 @@ import MVT from '../src/ol/format/MVT.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import {get as getProjection} from '../src/ol/proj.js'; import {get as getProjection} from '../src/ol/proj.js';
import VectorTileSource from '../src/ol/source/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -45,7 +45,7 @@ var map = new Map({
}), }),
tileUrlFunction: tileUrlFunction tileUrlFunction: tileUrlFunction
}), }),
style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) style: createMapboxStreetsV6Style(Style, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_)
}) })
], ],
target: 'map', target: 'map',

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import MVT from '../src/ol/format/MVT.js'; import MVT from '../src/ol/format/MVT.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import VectorTileSource from '../src/ol/source/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -24,7 +24,7 @@ var map = new Map({
url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' +
'{z}/{x}/{y}.vector.pbf?access_token=' + key '{z}/{x}/{y}.vector.pbf?access_token=' + key
}), }),
style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) style: createMapboxStreetsV6Style(Style, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_)
}) })
], ],
target: 'map', target: 'map',

View File

@@ -11,7 +11,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -25,7 +25,7 @@ var source = new VectorSource();
var vector = new VectorLayer({ var vector = new VectorLayer({
source: source, source: source,
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)' color: 'rgba(255, 255, 255, 0.2)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -34,7 +34,7 @@ var vector = new VectorLayer({
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#ffcc33' color: '#ffcc33'
}) })
}) })
@@ -181,7 +181,7 @@ function addInteraction() {
source: source, source: source,
type: type, type: type,
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)' color: 'rgba(255, 255, 255, 0.2)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -194,7 +194,7 @@ function addInteraction() {
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: 'rgba(0, 0, 0, 0.7)' color: 'rgba(0, 0, 0, 0.7)'
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)' color: 'rgba(255, 255, 255, 0.2)'
}) })
}) })

View File

@@ -7,7 +7,7 @@ import Select from '../src/ol/interaction/Select.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -25,7 +25,7 @@ var styleFunction = (function() {
color: 'blue', color: 'blue',
width: 3 width: 3
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 0, 255, 0.1)' color: 'rgba(0, 0, 255, 0.1)'
}) })
}); });
@@ -40,7 +40,7 @@ var styleFunction = (function() {
color: 'yellow', color: 'yellow',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 0, 0.1)' color: 'rgba(255, 255, 0, 0.1)'
}) })
}); });
@@ -49,7 +49,7 @@ var styleFunction = (function() {
color: 'red', color: 'red',
width: 3 width: 3
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 0, 0, 0.1)' color: 'rgba(255, 0, 0, 0.1)'
}), }),
image: image image: image
@@ -157,7 +157,7 @@ var overlayStyle = (function() {
var styles = {}; var styles = {};
styles['Polygon'] = [ styles['Polygon'] = [
new Style({ new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: [255, 255, 255, 0.5] color: [255, 255, 255, 0.5]
}) })
}), }),
@@ -196,7 +196,7 @@ var overlayStyle = (function() {
new Style({ new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
fill: new _ol_style_Fill_({ fill: new Fill({
color: [0, 153, 255, 1] color: [0, 153, 255, 1]
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -4,7 +4,7 @@ import TopoJSON from '../src/ol/format/TopoJSON.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import VectorTileSource from '../src/ol/source/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -17,7 +17,7 @@ var roadColor = {
'highway': '#f39' 'highway': '#f39'
}; };
var buildingStyle = new Style({ var buildingStyle = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#666', color: '#666',
opacity: 0.4 opacity: 0.4
}), }),
@@ -27,7 +27,7 @@ var buildingStyle = new Style({
}) })
}); });
var waterStyle = new Style({ var waterStyle = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#9db9e8' color: '#9db9e8'
}) })
}); });

View File

@@ -5,7 +5,7 @@ import MultiPoint from '../src/ol/geom/MultiPoint.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -22,14 +22,14 @@ var styles = [
color: 'blue', color: 'blue',
width: 3 width: 3
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 0, 255, 0.1)' color: 'rgba(0, 0, 255, 0.1)'
}) })
}), }),
new Style({ new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'orange' color: 'orange'
}) })
}), }),

View File

@@ -4,14 +4,14 @@ import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
var stroke = new _ol_style_Stroke_({color: 'black', width: 2}); var stroke = new _ol_style_Stroke_({color: 'black', width: 2});
var fill = new _ol_style_Fill_({color: 'red'}); var fill = new Fill({color: 'red'});
var styles = { var styles = {
'square': new Style({ 'square': new Style({

View File

@@ -3,7 +3,7 @@ import Point from '../src/ol/geom/Point.js';
import Polygon from '../src/ol/geom/Polygon.js'; import Polygon from '../src/ol/geom/Polygon.js';
import _ol_render_ from '../src/ol/render.js'; import _ol_render_ from '../src/ol/render.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -11,7 +11,7 @@ import Style from '../src/ol/style/Style.js';
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
var vectorContext = _ol_render_.toContext(canvas.getContext('2d'), {size: [100, 100]}); var vectorContext = _ol_render_.toContext(canvas.getContext('2d'), {size: [100, 100]});
var fill = new _ol_style_Fill_({color: 'blue'}); var fill = new Fill({color: 'blue'});
var stroke = new _ol_style_Stroke_({color: 'black'}); var stroke = new _ol_style_Stroke_({color: 'black'});
var style = new Style({ var style = new Style({
fill: fill, fill: fill,

View File

@@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -20,7 +20,7 @@ var raster = new TileLayer({
var vector = new VectorLayer({ var vector = new VectorLayer({
source: new VectorSource(), source: new VectorSource(),
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)' color: 'rgba(255, 255, 255, 0.2)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -29,7 +29,7 @@ var vector = new VectorLayer({
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#ffcc33' color: '#ffcc33'
}) })
}) })

View File

@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
@@ -14,7 +14,7 @@ var style = new Style({
text: new _ol_style_Text_({ text: new _ol_style_Text_({
font: 'bold 11px "Open Sans", "Arial Unicode MS", "sans-serif"', font: 'bold 11px "Open Sans", "Arial Unicode MS", "sans-serif"',
placement: 'line', placement: 'line',
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'white' color: 'white'
}) })
}) })

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import AtlasManager from '../src/ol/style/AtlasManager.js'; import AtlasManager from '../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -51,7 +51,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
opacity: info.opacity, opacity: info.opacity,
scale: info.scale, scale: info.scale,
radius: radiuses[j], radius: radiuses[j],
fill: new _ol_style_Fill_({ fill: new Fill({
color: info.fillColor color: info.fillColor
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -71,7 +71,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
radius: radiuses[j], radius: radiuses[j],
radius2: radiuses[j] * 0.7, radius2: radiuses[j] * 0.7,
angle: 1.4, angle: 1.4,
fill: new _ol_style_Fill_({ fill: new Fill({
color: info.fillColor color: info.fillColor
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -6,7 +6,7 @@ import Point from '../src/ol/geom/Point.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -27,14 +27,14 @@ var styles = {
'10': new Style({ '10': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({color: '#666666'}), fill: new Fill({color: '#666666'}),
stroke: new _ol_style_Stroke_({color: '#bada55', width: 1}) stroke: new _ol_style_Stroke_({color: '#bada55', width: 1})
}) })
}), }),
'20': new Style({ '20': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({color: '#666666'}), fill: new Fill({color: '#666666'}),
stroke: new _ol_style_Stroke_({color: '#bada55', width: 1}) stroke: new _ol_style_Stroke_({color: '#bada55', width: 1})
}) })
}) })

View File

@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import TileJSON from '../src/ol/source/TileJSON.js'; import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -17,7 +17,7 @@ var raster = new TileLayer({
}); });
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -15,7 +15,7 @@ import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
import MousePosition from '../src/ol/control/MousePosition.js'; import MousePosition from '../src/ol/control/MousePosition.js';
@@ -31,12 +31,12 @@ var nodesLayer = new VectorLayer({
var style = new Style({ var style = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 8, radius: 8,
fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.2)'}), fill: new Fill({color: 'rgba(255, 0, 0, 0.2)'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1}) stroke: new _ol_style_Stroke_({color: 'red', width: 1})
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
text: f.get('node').id.toString(), text: f.get('node').id.toString(),
fill: new _ol_style_Fill_({color: 'red'}), fill: new Fill({color: 'red'}),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: 'white', color: 'white',
width: 3 width: 3
@@ -58,7 +58,7 @@ var edgesLayer = new VectorLayer({
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
text: f.get('edge').id.toString(), text: f.get('edge').id.toString(),
fill: new _ol_style_Fill_({color: 'blue'}), fill: new Fill({color: 'blue'}),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: 'white', color: 'white',
width: 2 width: 2
@@ -78,13 +78,13 @@ var facesLayer = new VectorLayer({
color: 'black', color: 'black',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 255, 0, 0.2)' color: 'rgba(0, 255, 0, 0.2)'
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
font: 'bold 12px sans-serif', font: 'bold 12px sans-serif',
text: f.get('face').id.toString(), text: f.get('face').id.toString(),
fill: new _ol_style_Fill_({color: 'green'}), fill: new Fill({color: 'green'}),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: 'white', color: 'white',
width: 2 width: 2

View File

@@ -7,7 +7,7 @@ import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import XYZ from '../src/ol/source/XYZ.js'; import XYZ from '../src/ol/source/XYZ.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_tilegrid_ from '../src/ol/tilegrid.js'; import _ol_tilegrid_ from '../src/ol/tilegrid.js';
@@ -21,7 +21,7 @@ var esrijsonFormat = new EsriJSON();
var styleCache = { var styleCache = {
'ABANDONED': new Style({ 'ABANDONED': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(225, 225, 225, 255)' color: 'rgba(225, 225, 225, 255)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -30,7 +30,7 @@ var styleCache = {
}) })
}), }),
'GAS': new Style({ 'GAS': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 0, 0, 255)' color: 'rgba(255, 0, 0, 255)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -39,7 +39,7 @@ var styleCache = {
}) })
}), }),
'OIL': new Style({ 'OIL': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(56, 168, 0, 255)' color: 'rgba(56, 168, 0, 255)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -48,7 +48,7 @@ var styleCache = {
}) })
}), }),
'OILGAS': new Style({ 'OILGAS': new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(168, 112, 0, 255)' color: 'rgba(168, 112, 0, 255)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -4,7 +4,7 @@ import * as _ol_extent_ from '../src/ol/extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
@@ -38,7 +38,7 @@ var labelStyle = new Style({
text: new _ol_style_Text_({ text: new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
overflow: true, overflow: true,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#000' color: '#000'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -48,7 +48,7 @@ var labelStyle = new Style({
}) })
}); });
var countryStyle = new Style({ var countryStyle = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
@@ -114,7 +114,7 @@ var createTextStyle = function(feature, resolution, dom) {
textBaseline: baseline, textBaseline: baseline,
font: font, font: font,
text: getText(feature, resolution, dom), text: getText(feature, resolution, dom),
fill: new _ol_style_Fill_({color: fillColor}), fill: new Fill({color: fillColor}),
stroke: new _ol_style_Stroke_({color: outlineColor, width: outlineWidth}), stroke: new _ol_style_Stroke_({color: outlineColor, width: outlineWidth}),
offsetX: offsetX, offsetX: offsetX,
offsetY: offsetY, offsetY: offsetY,
@@ -133,7 +133,7 @@ function polygonStyleFunction(feature, resolution) {
color: 'blue', color: 'blue',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 0, 255, 0.1)' color: 'rgba(0, 0, 255, 0.1)'
}), }),
text: createTextStyle(feature, resolution, myDom.polygons) text: createTextStyle(feature, resolution, myDom.polygons)
@@ -174,7 +174,7 @@ function pointStyleFunction(feature, resolution) {
return new Style({ return new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.1)'}), fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1}) stroke: new _ol_style_Stroke_({color: 'red', width: 1})
}), }),
text: createTextStyle(feature, resolution, myDom.points) text: createTextStyle(feature, resolution, myDom.points)

View File

@@ -3,14 +3,14 @@ import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import VectorLayer from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
import _ol_style_Text_ from '../src/ol/style/Text.js'; import _ol_style_Text_ from '../src/ol/style/Text.js';
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -19,7 +19,7 @@ var style = new Style({
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#000' color: '#000'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -54,12 +54,12 @@ var highlightStyle = new Style({
color: '#f00', color: '#f00',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.1)' color: 'rgba(255,0,0,0.1)'
}), }),
text: new _ol_style_Text_({ text: new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#000' color: '#000'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -9,7 +9,7 @@ import {transformExtent} from '../src/ol/proj.js';
import BingMaps from '../src/ol/source/BingMaps.js'; import BingMaps from '../src/ol/source/BingMaps.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import Fill from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js'; import Style from '../src/ol/style/Style.js';
@@ -22,7 +22,7 @@ var styles = {
color: 'rgba(170, 170, 170, 1.0)', color: 'rgba(170, 170, 170, 1.0)',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(170, 170, 170, 0.3)' color: 'rgba(170, 170, 170, 0.3)'
}) })
}) })
@@ -34,7 +34,7 @@ var styles = {
color: 'rgba(246, 99, 79, 1.0)', color: 'rgba(246, 99, 79, 1.0)',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(246, 99, 79, 0.3)' color: 'rgba(246, 99, 79, 0.3)'
}) })
}) })
@@ -59,7 +59,7 @@ var styles = {
color: 'rgba(140, 208, 95, 1.0)', color: 'rgba(140, 208, 95, 1.0)',
width: 1 width: 1
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(140, 208, 95, 0.3)' color: 'rgba(140, 208, 95, 0.3)'
}) })
}) })
@@ -68,7 +68,7 @@ var styles = {
'tree': new Style({ 'tree': new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 2, radius: 2,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(140, 208, 95, 1.0)' color: 'rgba(140, 208, 95, 1.0)'
}), }),
stroke: null stroke: null

View File

@@ -10,7 +10,7 @@ import _ol_geom_flat_geodesic_ from './geom/flat/geodesic.js';
import {clamp} from './math.js'; import {clamp} from './math.js';
import {get as getProjection, equivalent as equivalentProjection, getTransform, transformExtent} from './proj.js'; import {get as getProjection, equivalent as equivalentProjection, getTransform, transformExtent} from './proj.js';
import RenderEventType from './render/EventType.js'; import RenderEventType from './render/EventType.js';
import _ol_style_Fill_ from './style/Fill.js'; import Fill from './style/Fill.js';
import _ol_style_Stroke_ from './style/Stroke.js'; import _ol_style_Stroke_ from './style/Stroke.js';
import _ol_style_Text_ from './style/Text.js'; import _ol_style_Text_ from './style/Text.js';
@@ -286,7 +286,7 @@ var Graticule = function(opt_options) {
new _ol_style_Text_({ new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
textBaseline: 'bottom', textBaseline: 'bottom',
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,0,1)' color: 'rgba(0,0,0,1)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -303,7 +303,7 @@ var Graticule = function(opt_options) {
new _ol_style_Text_({ new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
textAlign: 'end', textAlign: 'end',
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,0,1)' color: 'rgba(0,0,0,1)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -20,7 +20,7 @@ import Point from '../geom/Point.js';
import Polygon from '../geom/Polygon.js'; import Polygon from '../geom/Polygon.js';
import {toRadians} from '../math.js'; import {toRadians} from '../math.js';
import {get as getProjection} from '../proj.js'; import {get as getProjection} from '../proj.js';
import _ol_style_Fill_ from '../style/Fill.js'; import Fill from '../style/Fill.js';
import _ol_style_Icon_ from '../style/Icon.js'; import _ol_style_Icon_ from '../style/Icon.js';
import IconAnchorUnits from '../style/IconAnchorUnits.js'; import IconAnchorUnits from '../style/IconAnchorUnits.js';
import IconOrigin from '../style/IconOrigin.js'; import IconOrigin from '../style/IconOrigin.js';
@@ -145,7 +145,7 @@ KML.createStyleDefaults_ = function() {
* @type {ol.style.Fill} * @type {ol.style.Fill}
* @private * @private
*/ */
KML.DEFAULT_FILL_STYLE_ = new _ol_style_Fill_({ KML.DEFAULT_FILL_STYLE_ = new Fill({
color: KML.DEFAULT_COLOR_ color: KML.DEFAULT_COLOR_
}); });
@@ -666,7 +666,7 @@ KML.LabelStyleParser_ = function(node, objectStack) {
} }
var styleObject = objectStack[objectStack.length - 1]; var styleObject = objectStack[objectStack.length - 1];
var textStyle = new _ol_style_Text_({ var textStyle = new _ol_style_Text_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: /** @type {ol.Color} */ color: /** @type {ol.Color} */
('color' in object ? object['color'] : KML.DEFAULT_COLOR_) ('color' in object ? object['color'] : KML.DEFAULT_COLOR_)
}), }),
@@ -716,7 +716,7 @@ KML.PolyStyleParser_ = function(node, objectStack) {
return; return;
} }
var styleObject = objectStack[objectStack.length - 1]; var styleObject = objectStack[objectStack.length - 1];
var fillStyle = new _ol_style_Fill_({ var fillStyle = new Fill({
color: /** @type {ol.Color} */ color: /** @type {ol.Color} */
('color' in object ? object['color'] : KML.DEFAULT_COLOR_) ('color' in object ? object['color'] : KML.DEFAULT_COLOR_)
}); });

View File

@@ -12,7 +12,7 @@ import {asString} from '../color.js';
* @param {olx.style.FillOptions=} opt_options Options. * @param {olx.style.FillOptions=} opt_options Options.
* @api * @api
*/ */
var _ol_style_Fill_ = function(opt_options) { var Fill = function(opt_options) {
var options = opt_options || {}; var options = opt_options || {};
@@ -35,9 +35,9 @@ var _ol_style_Fill_ = function(opt_options) {
* @return {ol.style.Fill} The cloned style. * @return {ol.style.Fill} The cloned style.
* @api * @api
*/ */
_ol_style_Fill_.prototype.clone = function() { Fill.prototype.clone = function() {
var color = this.getColor(); var color = this.getColor();
return new _ol_style_Fill_({ return new Fill({
color: (color && color.slice) ? color.slice() : color || undefined color: (color && color.slice) ? color.slice() : color || undefined
}); });
}; };
@@ -48,7 +48,7 @@ _ol_style_Fill_.prototype.clone = function() {
* @return {ol.Color|ol.ColorLike} Color. * @return {ol.Color|ol.ColorLike} Color.
* @api * @api
*/ */
_ol_style_Fill_.prototype.getColor = function() { Fill.prototype.getColor = function() {
return this.color_; return this.color_;
}; };
@@ -59,7 +59,7 @@ _ol_style_Fill_.prototype.getColor = function() {
* @param {ol.Color|ol.ColorLike} color Color. * @param {ol.Color|ol.ColorLike} color Color.
* @api * @api
*/ */
_ol_style_Fill_.prototype.setColor = function(color) { Fill.prototype.setColor = function(color) {
this.color_ = color; this.color_ = color;
this.checksum_ = undefined; this.checksum_ = undefined;
}; };
@@ -68,7 +68,7 @@ _ol_style_Fill_.prototype.setColor = function(color) {
/** /**
* @return {string} The checksum. * @return {string} The checksum.
*/ */
_ol_style_Fill_.prototype.getChecksum = function() { Fill.prototype.getChecksum = function() {
if (this.checksum_ === undefined) { if (this.checksum_ === undefined) {
if ( if (
this.color_ instanceof CanvasPattern || this.color_ instanceof CanvasPattern ||
@@ -82,4 +82,4 @@ _ol_style_Fill_.prototype.getChecksum = function() {
return this.checksum_; return this.checksum_;
}; };
export default _ol_style_Fill_; export default Fill;

View File

@@ -4,7 +4,7 @@
import {assert} from '../asserts.js'; import {assert} from '../asserts.js';
import GeometryType from '../geom/GeometryType.js'; import GeometryType from '../geom/GeometryType.js';
import _ol_style_Circle_ from '../style/Circle.js'; import _ol_style_Circle_ from '../style/Circle.js';
import _ol_style_Fill_ from '../style/Fill.js'; import Fill from '../style/Fill.js';
import _ol_style_Stroke_ from '../style/Stroke.js'; import _ol_style_Stroke_ from '../style/Stroke.js';
/** /**
@@ -322,7 +322,7 @@ Style.defaultFunction = function(feature, resolution) {
// canvas.getContext('2d') at construction time, which will cause an.error // canvas.getContext('2d') at construction time, which will cause an.error
// in such browsers.) // in such browsers.)
if (!Style.default_) { if (!Style.default_) {
var fill = new _ol_style_Fill_({ var fill = new Fill({
color: 'rgba(255,255,255,0.4)' color: 'rgba(255,255,255,0.4)'
}); });
var stroke = new _ol_style_Stroke_({ var stroke = new _ol_style_Stroke_({
@@ -357,7 +357,7 @@ Style.createDefaultEditing = function() {
var width = 3; var width = 3;
styles[GeometryType.POLYGON] = [ styles[GeometryType.POLYGON] = [
new Style({ new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: [255, 255, 255, 0.5] color: [255, 255, 255, 0.5]
}) })
}) })
@@ -392,7 +392,7 @@ Style.createDefaultEditing = function() {
new Style({ new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: width * 2, radius: width * 2,
fill: new _ol_style_Fill_({ fill: new Fill({
color: blue color: blue
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -1,7 +1,7 @@
/** /**
* @module ol/style/Text * @module ol/style/Text
*/ */
import _ol_style_Fill_ from '../style/Fill.js'; import Fill from '../style/Fill.js';
import TextPlacement from '../style/TextPlacement.js'; import TextPlacement from '../style/TextPlacement.js';
/** /**
@@ -63,7 +63,7 @@ var _ol_style_Text_ = function(opt_options) {
* @type {ol.style.Fill} * @type {ol.style.Fill}
*/ */
this.fill_ = options.fill !== undefined ? options.fill : this.fill_ = options.fill !== undefined ? options.fill :
new _ol_style_Fill_({color: _ol_style_Text_.DEFAULT_FILL_COLOR_}); new Fill({color: _ol_style_Text_.DEFAULT_FILL_COLOR_});
/** /**
* @private * @private

View File

@@ -8,7 +8,7 @@ import {transform} from '../../../../src/ol/proj.js';
import TileImage from '../../../../src/ol/source/TileImage.js'; import TileImage from '../../../../src/ol/source/TileImage.js';
import XYZ from '../../../../src/ol/source/XYZ.js'; import XYZ from '../../../../src/ol/source/XYZ.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js'; import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -281,7 +281,7 @@ describe('ol.rendering.layer.Tile', function() {
e.vectorContext.setImageStyle(new _ol_style_Circle_({ e.vectorContext.setImageStyle(new _ol_style_Circle_({
radius: 5, radius: 5,
snapToPixel: false, snapToPixel: false,
fill: new _ol_style_Fill_({color: 'yellow'}), fill: new Fill({color: 'yellow'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1}) stroke: new _ol_style_Stroke_({color: 'red', width: 1})
})); }));
e.vectorContext.drawPoint(new Point( e.vectorContext.drawPoint(new Point(

View File

@@ -9,7 +9,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -255,7 +255,7 @@ describe('ol.rendering.layer.Vector', function() {
renderMode: 'image', renderMode: 'image',
source: source, source: source,
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(255,0,0,0.5)' color: 'rgba(255,0,0,0.5)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -355,7 +355,7 @@ describe('ol.rendering.layer.Vector', function() {
color: alternateColor(), color: alternateColor(),
width: 1.25 width: 1.25
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: alternateColor() color: alternateColor()
}) })
}); });
@@ -406,7 +406,7 @@ describe('ol.rendering.layer.Vector', function() {
color: alternateColor(), color: alternateColor(),
width: 1.25 width: 1.25
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: alternateColor() color: alternateColor()
}) })
}); });
@@ -471,7 +471,7 @@ describe('ol.rendering.layer.Vector', function() {
features: [feature] features: [feature]
}), }),
style: new Style({ style: new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'blue' color: 'blue'
}) })
}) })
@@ -539,7 +539,7 @@ describe('ol.rendering.layer.Vector', function() {
color: [0, 0, 0, 1], color: [0, 0, 0, 1],
width: 2 width: 2
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: [255, 0, 0, 1] color: [255, 0, 0, 1]
}) })
})); }));
@@ -551,7 +551,7 @@ describe('ol.rendering.layer.Vector', function() {
it('renders partially out-of-view polygons with a fill', function(done) { it('renders partially out-of-view polygons with a fill', function(done) {
layer.setStyle(new Style({ layer.setStyle(new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}) })
})); }));

View File

@@ -9,7 +9,7 @@ import _ol_obj_ from '../../../../src/ol/obj.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import VectorTileSource from '../../../../src/ol/source/VectorTile.js'; import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js'; import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -107,7 +107,7 @@ describe('ol.rendering.layer.VectorTile', function() {
style: new Style({ style: new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'red' color: 'red'
}) })
}) })
@@ -146,7 +146,7 @@ describe('ol.rendering.layer.VectorTile', function() {
return new Style({ return new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 7, radius: 7,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'red' color: 'red'
}) })
}), }),

View File

@@ -5,7 +5,7 @@ import _ol_render_ from '../../../src/ol/render.js';
import VectorContext from '../../../src/ol/render/VectorContext.js'; import VectorContext from '../../../src/ol/render/VectorContext.js';
import CanvasImmediateRenderer from '../../../src/ol/render/canvas/Immediate.js'; import CanvasImmediateRenderer from '../../../src/ol/render/canvas/Immediate.js';
import _ol_style_Circle_ from '../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../src/ol/style/Fill.js'; import Fill from '../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js';
import Style from '../../../src/ol/style/Style.js'; import Style from '../../../src/ol/style/Style.js';
@@ -35,7 +35,7 @@ describe('ol.render', function() {
var style = new Style({ var style = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'green' color: 'green'
}), }),
radius: 10 radius: 10
@@ -136,7 +136,7 @@ describe('ol.render', function() {
color: 'blue', color: 'blue',
width: 8 width: 8
}), }),
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0,0,255,0.5)' color: 'rgba(0,0,255,0.5)'
}) })
}); });

View File

@@ -6,7 +6,7 @@ import View from '../../../../src/ol/View.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -51,7 +51,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 2, radius: 2,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#91E339' color: '#91E339'
}) })
}) })
@@ -64,7 +64,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 4, radius: 4,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#5447E6' color: '#5447E6'
}) })
}) })
@@ -77,7 +77,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 6, radius: 6,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#92A8A6' color: '#92A8A6'
}) })
}) })
@@ -90,7 +90,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 2, radius: 2,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#91E339' color: '#91E339'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -107,7 +107,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 4, radius: 4,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#5447E6' color: '#5447E6'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -124,7 +124,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 6, radius: 6,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#92A8A6' color: '#92A8A6'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -155,7 +155,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 4, radius: 4,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(0, 0, 255, 0.3)' color: 'rgba(0, 0, 255, 0.3)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -172,7 +172,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({ feature.setStyle(new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 6, radius: 6,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(235, 45, 70, 0.6)' color: 'rgba(235, 45, 70, 0.6)'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -4,7 +4,7 @@ import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -44,7 +44,7 @@ describe('ol.rendering.style.Polygon', function() {
describe('different types', function() { describe('different types', function() {
function createFeatures() { function createFeatures() {
var fill = new _ol_style_Fill_({color: 'red'}); var fill = new Fill({color: 'red'});
var feature; var feature;
// rectangle // rectangle
@@ -179,7 +179,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#E31E10'}), fill: new Fill({color: '#E31E10'}),
zIndex: 2 zIndex: 2
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -191,7 +191,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#1A5E42'}), fill: new Fill({color: '#1A5E42'}),
zIndex: 3 zIndex: 3
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -203,7 +203,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#DEDE21'}), fill: new Fill({color: '#DEDE21'}),
zIndex: 1 zIndex: 1
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -236,7 +236,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#9696EB'}), fill: new Fill({color: '#9696EB'}),
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1}) stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -248,7 +248,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.1)'}), fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}),
stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3}) stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3})
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -260,7 +260,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: 'rgba(18, 204, 105, 0.3)'}), fill: new Fill({color: 'rgba(18, 204, 105, 0.3)'}),
stroke: new _ol_style_Stroke_({color: '#032E17', width: 2}) stroke: new _ol_style_Stroke_({color: '#032E17', width: 2})
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);
@@ -322,7 +322,7 @@ describe('ol.rendering.style.Polygon', function() {
]) ])
}); });
feature.setStyle(new Style({ feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: createPattern()}), fill: new Fill({color: createPattern()}),
stroke: new _ol_style_Stroke_({color: createRainbowGradient(), width: 3}) stroke: new _ol_style_Stroke_({color: createRainbowGradient(), width: 3})
})); }));
vectorSource.addFeature(feature); vectorSource.addFeature(feature);

View File

@@ -4,7 +4,7 @@ import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -109,7 +109,7 @@ describe('ol.rendering.style.RegularShape', function() {
describe('#render', function() { describe('#render', function() {
var stroke = new _ol_style_Stroke_({width: 2}); var stroke = new _ol_style_Stroke_({width: 2});
var fill = new _ol_style_Fill_({color: 'red'}); var fill = new Fill({color: 'red'});
it('tests the canvas renderer', function(done) { it('tests the canvas renderer', function(done) {
createMap('canvas'); createMap('canvas');
@@ -144,7 +144,7 @@ describe('ol.rendering.style.RegularShape', function() {
describe('uses the default fill and stroke color', function() { describe('uses the default fill and stroke color', function() {
var stroke = new _ol_style_Stroke_(); var stroke = new _ol_style_Stroke_();
var fill = new _ol_style_Fill_(); var fill = new Fill();
it('tests the canvas renderer', function(done) { it('tests the canvas renderer', function(done) {
createMap('canvas'); createMap('canvas');

View File

@@ -9,7 +9,7 @@ import View from '../../../../src/ol/View.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js'; import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -68,7 +68,7 @@ describe('ol.rendering.style.Text', function() {
text: new _ol_style_Text_({ text: new _ol_style_Text_({
scale: scale, scale: scale,
text: 'hello', text: 'hello',
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'red', color: 'red',
font: '12px sans-serif' font: '12px sans-serif'
}), }),
@@ -333,17 +333,17 @@ describe('ol.rendering.style.Text', function() {
createMap('canvas'); createMap('canvas');
createFeatures(); createFeatures();
var features = vectorSource.getFeatures(); var features = vectorSource.getFeatures();
features[0].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({ features[0].getStyle().getText().setBackgroundFill(new Fill({
color: 'red' color: 'red'
})); }));
features[1].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({ features[1].getStyle().getText().setBackgroundFill(new Fill({
color: 'red' color: 'red'
})); }));
features[1].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({ features[1].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({
color: 'blue', color: 'blue',
width: 3 width: 3
})); }));
features[2].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({ features[2].getStyle().getText().setBackgroundFill(new Fill({
color: 'red' color: 'red'
})); }));
features[2].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({ features[2].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({

View File

@@ -14,7 +14,7 @@ import {addProjection, addCoordinateTransforms, transform, get as getProjection}
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js'; import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js'; import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js';
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js'; import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
import IconOrigin from '../../../../src/ol/style/IconOrigin.js'; import IconOrigin from '../../../../src/ol/style/IconOrigin.js';
@@ -1947,7 +1947,7 @@ describe('ol.format.KML', function() {
expect(textStyle).to.be.an(_ol_style_Text_); expect(textStyle).to.be.an(_ol_style_Text_);
expect(textStyle.getScale()).to.be(0.25); expect(textStyle.getScale()).to.be(0.25);
var textFillStyle = textStyle.getFill(); var textFillStyle = textStyle.getFill();
expect(textFillStyle).to.be.an(_ol_style_Fill_); expect(textFillStyle).to.be.an(Fill);
expect(textFillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(textFillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getZIndex()).to.be(undefined); expect(style.getZIndex()).to.be(undefined);
}); });
@@ -2008,7 +2008,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0]; var style = styleArray[0];
expect(style).to.be.an(Style); expect(style).to.be.an(Style);
var fillStyle = style.getFill(); var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_); expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_); expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
expect(style.getStroke()).to.be(KML.DEFAULT_STROKE_STYLE_); expect(style.getStroke()).to.be(KML.DEFAULT_STROKE_STYLE_);
@@ -2045,7 +2045,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0]; var style = styleArray[0];
expect(style).to.be.an(Style); expect(style).to.be.an(Style);
var fillStyle = style.getFill(); var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_); expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_); expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
var strokeStyle = style.getStroke(); var strokeStyle = style.getStroke();
@@ -2121,7 +2121,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0]; var style = styleArray[0];
expect(style).to.be.an(Style); expect(style).to.be.an(Style);
var fillStyle = style.getFill(); var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_); expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_); expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
expect(style.getStroke()).to.be(null); expect(style.getStroke()).to.be(null);
@@ -2337,7 +2337,7 @@ describe('ol.format.KML', function() {
var style = new Style({ var style = new Style({
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
radius: 4, radius: 4,
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgb(12, 34, 223)' color: 'rgb(12, 34, 223)'
}) })
}) })
@@ -2364,7 +2364,7 @@ describe('ol.format.KML', function() {
text: new _ol_style_Text_({ text: new _ol_style_Text_({
scale: 0.5, scale: 0.5,
text: 'foo', text: 'foo',
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgb(12, 34, 223)' color: 'rgb(12, 34, 223)'
}) })
}) })
@@ -2421,7 +2421,7 @@ describe('ol.format.KML', function() {
it('can write an feature\'s fill style', function() { it('can write an feature\'s fill style', function() {
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(12, 34, 223, 0.7)' color: 'rgba(12, 34, 223, 0.7)'
}) })
}); });
@@ -2447,7 +2447,7 @@ describe('ol.format.KML', function() {
it('can write multiple features with Style', function() { it('can write multiple features with Style', function() {
var style = new Style({ var style = new Style({
fill: new _ol_style_Fill_({ fill: new Fill({
color: 'rgba(12, 34, 223, 0.7)' color: 'rgba(12, 34, 223, 0.7)'
}) })
}); });
@@ -2724,7 +2724,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0]; var style = styleArray[0];
expect(style).to.be.an(Style); expect(style).to.be.an(Style);
var fillStyle = style.getFill(); var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_); expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
}); });
@@ -2756,7 +2756,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0]; var style = styleArray[0];
expect(style).to.be.an(Style); expect(style).to.be.an(Style);
var fillStyle = style.getFill(); var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_); expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]); expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
}); });

View File

@@ -9,7 +9,7 @@ import Polygon from '../../../../../src/ol/geom/Polygon.js';
import VectorContext from '../../../../../src/ol/render/VectorContext.js'; import VectorContext from '../../../../../src/ol/render/VectorContext.js';
import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js'; import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js'; import Style from '../../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../../src/ol/style/Text.js';
@@ -42,7 +42,7 @@ describe('ol.render.canvas.Immediate', function() {
sinon.spy(context, 'setFillStrokeStyle'); sinon.spy(context, 'setFillStrokeStyle');
sinon.spy(context, 'setImageStyle'); sinon.spy(context, 'setImageStyle');
sinon.spy(context, 'setTextStyle'); sinon.spy(context, 'setTextStyle');
var fill = new _ol_style_Fill_({}); var fill = new Fill({});
var stroke = new _ol_style_Stroke_({}); var stroke = new _ol_style_Stroke_({});
var text = new _ol_style_Text_({}); var text = new _ol_style_Text_({});
var image = new _ol_style_Circle_({}); var image = new _ol_style_Circle_({});

View File

@@ -4,7 +4,7 @@ import Circle from '../../../../../src/ol/geom/Circle.js';
import _ol_render_webgl_CircleReplay_ from '../../../../../src/ol/render/webgl/CircleReplay.js'; import _ol_render_webgl_CircleReplay_ from '../../../../../src/ol/render/webgl/CircleReplay.js';
import _ol_render_webgl_circlereplay_defaultshader_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader.js'; import _ol_render_webgl_circlereplay_defaultshader_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader.js';
import _ol_render_webgl_circlereplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader/Locations.js'; import _ol_render_webgl_circlereplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader/Locations.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
describe('ol.render.webgl.CircleReplay', function() { describe('ol.render.webgl.CircleReplay', function() {
@@ -14,7 +14,7 @@ describe('ol.render.webgl.CircleReplay', function() {
color: [0, 255, 0, 0.4] color: [0, 255, 0, 0.4]
}); });
var fillStyle = new _ol_style_Fill_({ var fillStyle = new Fill({
color: [255, 0, 0, 1] color: [255, 0, 0, 1]
}); });

View File

@@ -13,7 +13,7 @@ import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Imme
import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js'; import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js';
import _ol_render_webgl_PolygonReplay_ from '../../../../../src/ol/render/webgl/PolygonReplay.js'; import _ol_render_webgl_PolygonReplay_ from '../../../../../src/ol/render/webgl/PolygonReplay.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js'; import Style from '../../../../../src/ol/style/Style.js';
@@ -23,7 +23,7 @@ describe('ol.render.webgl.Immediate', function() {
context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1); context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1);
style = new Style({ style = new Style({
image: new _ol_style_Circle_(), image: new _ol_style_Circle_(),
fill: new _ol_style_Fill_(), fill: new Fill(),
stroke: new _ol_style_Stroke_() stroke: new _ol_style_Stroke_()
}); });
circle = new Circle([0, 0], 5); circle = new Circle([0, 0], 5);

View File

@@ -7,13 +7,13 @@ import _ol_render_webgl_polygonreplay_defaultshader_ from '../../../../../src/ol
import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/polygonreplay/defaultshader/Locations.js'; import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/polygonreplay/defaultshader/Locations.js';
import LinkedList from '../../../../../src/ol/structs/LinkedList.js'; import LinkedList from '../../../../../src/ol/structs/LinkedList.js';
import RBush from '../../../../../src/ol/structs/RBush.js'; import RBush from '../../../../../src/ol/structs/RBush.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
describe('ol.render.webgl.PolygonReplay', function() { describe('ol.render.webgl.PolygonReplay', function() {
var replay; var replay;
var fillStyle = new _ol_style_Fill_({ var fillStyle = new Fill({
color: [0, 0, 255, 0.5] color: [0, 0, 255, 0.5]
}); });
var strokeStyle = new _ol_style_Stroke_({ var strokeStyle = new _ol_style_Stroke_({
@@ -435,7 +435,7 @@ describe('ol.render.webgl.PolygonReplay', function() {
}); });
it('draws the elements in batches if there are multiple fill styles', function() { it('draws the elements in batches if there are multiple fill styles', function() {
var fillStyle2 = new _ol_style_Fill_({ var fillStyle2 = new Fill({
color: [0, 255, 0, 1] color: [0, 255, 0, 1]
}); });
replay.setFillStrokeStyle(fillStyle, strokeStyle); replay.setFillStrokeStyle(fillStyle, strokeStyle);

View File

@@ -1,7 +1,7 @@
import {createCanvasContext2D} from '../../../../../src/ol/dom.js'; import {createCanvasContext2D} from '../../../../../src/ol/dom.js';
import Point from '../../../../../src/ol/geom/Point.js'; import Point from '../../../../../src/ol/geom/Point.js';
import _ol_render_webgl_TextReplay_ from '../../../../../src/ol/render/webgl/TextReplay.js'; import _ol_render_webgl_TextReplay_ from '../../../../../src/ol/render/webgl/TextReplay.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../../src/ol/style/Text.js';
@@ -37,7 +37,7 @@ describe('ol.render.webgl.TextReplay', function() {
beforeEach(function() { beforeEach(function() {
textStyle1 = createTextStyle( textStyle1 = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
new _ol_style_Stroke_({ new _ol_style_Stroke_({
@@ -51,7 +51,7 @@ describe('ol.render.webgl.TextReplay', function() {
}), }),
'someText'); 'someText');
textStyle2 = createTextStyle( textStyle2 = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [255, 255, 255, 1] color: [255, 255, 255, 1]
}), }),
new _ol_style_Stroke_({ new _ol_style_Stroke_({
@@ -62,7 +62,7 @@ describe('ol.render.webgl.TextReplay', function() {
); );
textStyle3 = createTextStyle(null, null, 'someText'); textStyle3 = createTextStyle(null, null, 'someText');
textStyle4 = createTextStyle( textStyle4 = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
new _ol_style_Stroke_({ new _ol_style_Stroke_({
@@ -115,7 +115,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#drawText', function() { describe('#drawText', function() {
beforeEach(function() { beforeEach(function() {
var textStyle = createTextStyle( var textStyle = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
null, 'someText'); null, 'someText');
@@ -171,7 +171,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#addCharToAtlas_', function() { describe('#addCharToAtlas_', function() {
beforeEach(function() { beforeEach(function() {
var textStyle = createTextStyle( var textStyle = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
null, 'someText'); null, 'someText');
@@ -209,7 +209,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#getTextSize_', function() { describe('#getTextSize_', function() {
beforeEach(function() { beforeEach(function() {
var textStyle = createTextStyle( var textStyle = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
null, 'someText'); null, 'someText');
@@ -261,7 +261,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#getAtlas_', function() { describe('#getAtlas_', function() {
beforeEach(function() { beforeEach(function() {
var textStyle = createTextStyle( var textStyle = createTextStyle(
new _ol_style_Fill_({ new Fill({
color: [0, 0, 0, 1] color: [0, 0, 0, 1]
}), }),
null, 'someText'); null, 'someText');

View File

@@ -12,7 +12,7 @@ import _ol_render_canvas_PolygonReplay_ from '../../../../../src/ol/render/canva
import _ol_render_canvas_Replay_ from '../../../../../src/ol/render/canvas/Replay.js'; import _ol_render_canvas_Replay_ from '../../../../../src/ol/render/canvas/Replay.js';
import _ol_render_canvas_ReplayGroup_ from '../../../../../src/ol/render/canvas/ReplayGroup.js'; import _ol_render_canvas_ReplayGroup_ from '../../../../../src/ol/render/canvas/ReplayGroup.js';
import _ol_renderer_vector_ from '../../../../../src/ol/renderer/vector.js'; import _ol_renderer_vector_ from '../../../../../src/ol/renderer/vector.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js'; import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js'; import Style from '../../../../../src/ol/style/Style.js';
import _ol_transform_ from '../../../../../src/ol/transform.js'; import _ol_transform_ from '../../../../../src/ol/transform.js';
@@ -38,17 +38,17 @@ describe('ol.render.canvas.ReplayGroup', function() {
feature3 = new Feature(new Polygon( feature3 = new Feature(new Polygon(
[[[-90, -45], [-90, 45], [90, 45], [90, -45], [-90, -45]]])); [[[-90, -45], [-90, 45], [90, 45], [90, -45], [-90, -45]]]));
fill0 = new Style({ fill0 = new Style({
fill: new _ol_style_Fill_({color: 'black'}) fill: new Fill({color: 'black'})
}); });
fill1 = new Style({ fill1 = new Style({
fill: new _ol_style_Fill_({color: 'red'}) fill: new Fill({color: 'red'})
}); });
style1 = new Style({ style1 = new Style({
fill: new _ol_style_Fill_({color: 'black'}), fill: new Fill({color: 'black'}),
stroke: new _ol_style_Stroke_({color: 'white', width: 1}) stroke: new _ol_style_Stroke_({color: 'white', width: 1})
}); });
style2 = new Style({ style2 = new Style({
fill: new _ol_style_Fill_({color: 'white'}), fill: new Fill({color: 'white'}),
stroke: new _ol_style_Stroke_({color: 'black', width: 1, lineDash: [3, 6], stroke: new _ol_style_Stroke_({color: 'black', width: 1, lineDash: [3, 6],
lineDashOffset: 2}) lineDashOffset: 2})
}); });

View File

@@ -8,7 +8,7 @@ import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js'; import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/ReplayGroup.js'; import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/ReplayGroup.js';
import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js'; import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
@@ -29,7 +29,7 @@ describe('ol.renderer.vector', function() {
}); });
style = new Style({ style = new Style({
image: iconStyle, image: iconStyle,
fill: new _ol_style_Fill_({}), fill: new Fill({}),
stroke: new _ol_style_Stroke_({}) stroke: new _ol_style_Stroke_({})
}); });
squaredTolerance = 1; squaredTolerance = 1;

View File

@@ -1,6 +1,6 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js'; import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -24,7 +24,7 @@ describe('ol.style.Circle', function() {
it('creates a canvas if no atlas is used (fill-style)', function() { it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_Circle_({ var style = new _ol_style_Circle_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#FFFF00' color: '#FFFF00'
}) })
}); });
@@ -58,7 +58,7 @@ describe('ol.style.Circle', function() {
var style = new _ol_style_Circle_({ var style = new _ol_style_Circle_({
radius: 10, radius: 10,
atlasManager: atlasManager, atlasManager: atlasManager,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#FFFF00' color: '#FFFF00'
}) })
}); });
@@ -85,7 +85,7 @@ describe('ol.style.Circle', function() {
it('copies all values', function() { it('copies all values', function() {
var original = new _ol_style_Circle_({ var original = new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -107,7 +107,7 @@ describe('ol.style.Circle', function() {
it('the clone does not reference the same objects as the original', function() { it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Circle_({ var original = new _ol_style_Circle_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -155,7 +155,7 @@ describe('ol.style.Circle', function() {
it('calculates not the same hash code (color)', function() { it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_Circle_({ var style1 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}) })
}); });
@@ -171,7 +171,7 @@ describe('ol.style.Circle', function() {
it('calculates the same hash code (everything set)', function() { it('calculates the same hash code (everything set)', function() {
var style1 = new _ol_style_Circle_({ var style1 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -185,7 +185,7 @@ describe('ol.style.Circle', function() {
}); });
var style2 = new _ol_style_Circle_({ var style2 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -203,7 +203,7 @@ describe('ol.style.Circle', function() {
it('calculates not the same hash code (stroke width differs)', function() { it('calculates not the same hash code (stroke width differs)', function() {
var style1 = new _ol_style_Circle_({ var style1 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -217,7 +217,7 @@ describe('ol.style.Circle', function() {
}); });
var style2 = new _ol_style_Circle_({ var style2 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -235,7 +235,7 @@ describe('ol.style.Circle', function() {
it('invalidates a cached checksum if values change (fill)', function() { it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_Circle_({ var style1 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -244,7 +244,7 @@ describe('ol.style.Circle', function() {
}); });
var style2 = new _ol_style_Circle_({ var style2 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -260,7 +260,7 @@ describe('ol.style.Circle', function() {
it('invalidates a cached checksum if values change (stroke)', function() { it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_Circle_({ var style1 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -269,7 +269,7 @@ describe('ol.style.Circle', function() {
}); });
var style2 = new _ol_style_Circle_({ var style2 = new _ol_style_Circle_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -288,7 +288,7 @@ describe('ol.style.Circle', function() {
it('changes the circle radius', function() { it('changes the circle radius', function() {
var style = new _ol_style_Circle_({ var style = new _ol_style_Circle_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#FFFF00' color: '#FFFF00'
}) })
}); });

View File

@@ -1,18 +1,18 @@
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
describe('ol.style.Fill', function() { describe('ol.style.Fill', function() {
describe('#clone', function() { describe('#clone', function() {
it('creates a new ol.style.Fill', function() { it('creates a new ol.style.Fill', function() {
var original = new _ol_style_Fill_(); var original = new Fill();
var clone = original.clone(); var clone = original.clone();
expect(clone).to.be.an(_ol_style_Fill_); expect(clone).to.be.an(Fill);
expect(clone).to.not.be(original); expect(clone).to.not.be(original);
}); });
it('copies all values', function() { it('copies all values', function() {
var original = new _ol_style_Fill_({ var original = new Fill({
color: '#319FD3' color: '#319FD3'
}); });
var clone = original.clone(); var clone = original.clone();
@@ -20,7 +20,7 @@ describe('ol.style.Fill', function() {
}); });
it('the clone does not reference the same objects as the original', function() { it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Fill_({ var original = new Fill({
color: [63, 255, 127, 0.7] color: [63, 255, 127, 0.7]
}); });
var clone = original.clone(); var clone = original.clone();

View File

@@ -1,6 +1,6 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js'; import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -50,7 +50,7 @@ describe('ol.style.RegularShape', function() {
it('creates a canvas if no atlas is used (fill-style)', function() { it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_RegularShape_({ var style = new _ol_style_RegularShape_({
radius: 10, radius: 10,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#FFFF00' color: '#FFFF00'
}) })
}); });
@@ -85,7 +85,7 @@ describe('ol.style.RegularShape', function() {
var style = new _ol_style_RegularShape_({ var style = new _ol_style_RegularShape_({
radius: 10, radius: 10,
atlasManager: atlasManager, atlasManager: atlasManager,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#FFFF00' color: '#FFFF00'
}) })
}); });
@@ -114,7 +114,7 @@ describe('ol.style.RegularShape', function() {
it('copies all values', function() { it('copies all values', function() {
var original = new _ol_style_RegularShape_({ var original = new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
points: 5, points: 5,
@@ -146,7 +146,7 @@ describe('ol.style.RegularShape', function() {
it('the clone does not reference the same objects as the original', function() { it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_RegularShape_({ var original = new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -204,7 +204,7 @@ describe('ol.style.RegularShape', function() {
it('calculates not the same hash code (color)', function() { it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_RegularShape_({ var style1 = new _ol_style_RegularShape_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}) })
}); });
@@ -223,7 +223,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3, radius2: 3,
angle: 1.41, angle: 1.41,
points: 5, points: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -240,7 +240,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3, radius2: 3,
angle: 1.41, angle: 1.41,
points: 5, points: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -261,7 +261,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3, radius2: 3,
angle: 1.41, angle: 1.41,
points: 5, points: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -278,7 +278,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3, radius2: 3,
angle: 1.41, angle: 1.41,
points: 5, points: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -296,7 +296,7 @@ describe('ol.style.RegularShape', function() {
it('invalidates a cached checksum if values change (fill)', function() { it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_RegularShape_({ var style1 = new _ol_style_RegularShape_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -305,7 +305,7 @@ describe('ol.style.RegularShape', function() {
}); });
var style2 = new _ol_style_RegularShape_({ var style2 = new _ol_style_RegularShape_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -321,7 +321,7 @@ describe('ol.style.RegularShape', function() {
it('invalidates a cached checksum if values change (stroke)', function() { it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_RegularShape_({ var style1 = new _ol_style_RegularShape_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -330,7 +330,7 @@ describe('ol.style.RegularShape', function() {
}); });
var style2 = new _ol_style_RegularShape_({ var style2 = new _ol_style_RegularShape_({
radius: 5, radius: 5,
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -1,7 +1,7 @@
import Feature from '../../../../src/ol/Feature.js'; import Feature from '../../../../src/ol/Feature.js';
import Point from '../../../../src/ol/geom/Point.js'; import Point from '../../../../src/ol/geom/Point.js';
import Style from '../../../../src/ol/style/Style.js'; import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -9,7 +9,7 @@ import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
describe('ol.style.Style', function() { describe('ol.style.Style', function() {
var testFill = new _ol_style_Fill_({ var testFill = new Fill({
color: 'rgba(255, 255, 255, 0.6)' color: 'rgba(255, 255, 255, 0.6)'
}); });
@@ -20,7 +20,7 @@ describe('ol.style.Style', function() {
var testText = new _ol_style_Text_({ var testText = new _ol_style_Text_({
font: '12px Calibri,sans-serif', font: '12px Calibri,sans-serif',
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#000' color: '#000'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -45,7 +45,7 @@ describe('ol.style.Style', function() {
it('copies all values', function() { it('copies all values', function() {
var original = new Style({ var original = new Style({
geometry: new Point([0, 0, 0]), geometry: new Point([0, 0, 0]),
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({
@@ -71,7 +71,7 @@ describe('ol.style.Style', function() {
it('the clone does not reference the same objects as the original', function() { it('the clone does not reference the same objects as the original', function() {
var original = new Style({ var original = new Style({
geometry: new Point([0, 0, 0]), geometry: new Point([0, 0, 0]),
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
image: new _ol_style_Circle_({ image: new _ol_style_Circle_({

View File

@@ -1,4 +1,4 @@
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -14,7 +14,7 @@ describe('ol.style.Text', function() {
it('uses a provided fill style if one passed', function() { it('uses a provided fill style if one passed', function() {
var style = new _ol_style_Text_({ var style = new _ol_style_Text_({
fill: new _ol_style_Fill_({color: '#123456'}) fill: new Fill({color: '#123456'})
}); });
expect(style.getFill().getColor()).to.be('#123456'); expect(style.getFill().getColor()).to.be('#123456');
}); });
@@ -47,13 +47,13 @@ describe('ol.style.Text', function() {
text: 'test', text: 'test',
textAlign: 'center', textAlign: 'center',
textBaseline: 'top', textBaseline: 'top',
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
color: '#319FD3' color: '#319FD3'
}), }),
backgroundFill: new _ol_style_Fill_({ backgroundFill: new Fill({
color: 'white' color: 'white'
}), }),
backgroundStroke: new _ol_style_Stroke_({ backgroundStroke: new _ol_style_Stroke_({
@@ -78,7 +78,7 @@ describe('ol.style.Text', function() {
it('the clone does not reference the same objects as the original', function() { it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Text_({ var original = new _ol_style_Text_({
fill: new _ol_style_Fill_({ fill: new Fill({
color: '#319FD3' color: '#319FD3'
}), }),
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({