Rename _ol_style_Stroke_ to Stroke
This commit is contained in:
@@ -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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 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 @@ var redLayer = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: 'rgb(255,0,0)',
|
color: 'rgb(255,0,0)',
|
||||||
width: 15
|
width: 15
|
||||||
}),
|
}),
|
||||||
@@ -41,7 +41,7 @@ var greenLayer = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: 'rgb(0,255,0)',
|
color: 'rgb(0,255,0)',
|
||||||
width: 15
|
width: 15
|
||||||
}),
|
}),
|
||||||
@@ -58,7 +58,7 @@ var blueLayer = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: 'rgb(0,0,255)',
|
color: 'rgb(0,0,255)',
|
||||||
width: 15
|
width: 15
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var canvas = document.createElement('canvas');
|
var canvas = document.createElement('canvas');
|
||||||
@@ -60,7 +60,7 @@ var pattern = (function() {
|
|||||||
var fill = new Fill();
|
var fill = new Fill();
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#333',
|
color: '#333',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var source = new VectorSource({
|
var source = new VectorSource({
|
||||||
@@ -19,7 +19,7 @@ var style = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -28,7 +28,7 @@ var style = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 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';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ var clusters = new VectorLayer({
|
|||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}),
|
}),
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ var map = new Map({
|
|||||||
opacity: 0.95,
|
opacity: 0.95,
|
||||||
src: 'data/icon.png'
|
src: 'data/icon.png'
|
||||||
})),
|
})),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
width: 3,
|
width: 3,
|
||||||
color: [255, 0, 0, 1]
|
color: [255, 0, 0, 1]
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -24,14 +24,14 @@ var defaultStyle = {
|
|||||||
color: 'rgba(255,255,0,0.5)'
|
color: 'rgba(255,255,0,0.5)'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#ff0',
|
color: '#ff0',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'LineString': new Style({
|
'LineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -40,7 +40,7 @@ var defaultStyle = {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#0ff',
|
color: '#0ff',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -51,14 +51,14 @@ var defaultStyle = {
|
|||||||
color: 'rgba(255,0,255,0.5)'
|
color: 'rgba(255,0,255,0.5)'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f0f',
|
color: '#f0f',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiLineString': new Style({
|
'MultiLineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#0f0',
|
color: '#0f0',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -67,7 +67,7 @@ var defaultStyle = {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#00f',
|
color: '#00f',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -24,14 +24,14 @@ var defaultStyle = {
|
|||||||
color: 'rgba(255,255,0,0.5)'
|
color: 'rgba(255,255,0,0.5)'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#ff0',
|
color: '#ff0',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'LineString': new Style({
|
'LineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -40,7 +40,7 @@ var defaultStyle = {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#0ff',
|
color: '#0ff',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -51,14 +51,14 @@ var defaultStyle = {
|
|||||||
color: 'rgba(255,0,255,0.5)'
|
color: 'rgba(255,0,255,0.5)'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f0f',
|
color: '#f0f',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiLineString': new Style({
|
'MultiLineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#0f0',
|
color: '#0f0',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -67,7 +67,7 @@ var defaultStyle = {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#00f',
|
color: '#00f',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var raster = new TileLayer({
|
var raster = new TileLayer({
|
||||||
@@ -23,7 +23,7 @@ var vector = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ var imageStyle = new Style({
|
|||||||
radius: 5,
|
radius: 5,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'yellow'}),
|
fill: new Fill({color: 'yellow'}),
|
||||||
stroke: new _ol_style_Stroke_({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -20,14 +20,14 @@ import _ol_style_Text_ from '../src/ol/style/Text.js';
|
|||||||
var earthquakeFill = new 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 Stroke({
|
||||||
color: 'rgba(255, 204, 0, 0.2)',
|
color: 'rgba(255, 204, 0, 0.2)',
|
||||||
width: 1
|
width: 1
|
||||||
});
|
});
|
||||||
var textFill = new Fill({
|
var textFill = new Fill({
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
});
|
});
|
||||||
var textStroke = new _ol_style_Stroke_({
|
var textStroke = new Stroke({
|
||||||
color: 'rgba(0, 0, 0, 0.6)',
|
color: 'rgba(0, 0, 0, 0.6)',
|
||||||
width: 3
|
width: 3
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ var styleFunction = function(feature) {
|
|||||||
{size: [size, size], pixelRatio: 1});
|
{size: [size, size], pixelRatio: 1});
|
||||||
vectorContext.setStyle(new Style({
|
vectorContext.setStyle(new Style({
|
||||||
fill: new 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 Stroke({color: 'rgba(255, 204, 0, 0.2)', width: 2})
|
||||||
}));
|
}));
|
||||||
vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)]));
|
vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)]));
|
||||||
style = new Style({
|
style = new Style({
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {fromLonLat} from '../src/ol/proj.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_Stroke_ from '../src/ol/style/Stroke.js';
|
import 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 @@ function flash(feature) {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: radius,
|
radius: radius,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(255, 0, 0, ' + opacity + ')',
|
color: 'rgba(255, 0, 0, ' + opacity + ')',
|
||||||
width: 0.25 + opacity
|
width: 0.25 + opacity
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
// This long string is placed here due to jsFiddle limitations.
|
// This long string is placed here due to jsFiddle limitations.
|
||||||
@@ -86,7 +86,7 @@ var endMarker = new Feature({
|
|||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
'route': new Style({
|
'route': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
width: 6, color: [237, 212, 0, 0.8]
|
width: 6, color: [237, 212, 0, 0.8]
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
@@ -101,7 +101,7 @@ var styles = {
|
|||||||
radius: 7,
|
radius: 7,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'black'}),
|
fill: new Fill({color: 'black'}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'white', width: 2
|
color: 'white', width: 2
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,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_Stroke_ from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var map = new Map({
|
var map = new Map({
|
||||||
@@ -26,7 +26,7 @@ var map = new Map({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#EAE911',
|
color: '#EAE911',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
var image = new _ol_style_Circle_({
|
var image = new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new _ol_style_Stroke_({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
});
|
});
|
||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
@@ -25,13 +25,13 @@ var styles = {
|
|||||||
image: image
|
image: image
|
||||||
}),
|
}),
|
||||||
'LineString': new Style({
|
'LineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'green',
|
color: 'green',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiLineString': new Style({
|
'MultiLineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'green',
|
color: 'green',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -40,7 +40,7 @@ var styles = {
|
|||||||
image: image
|
image: image
|
||||||
}),
|
}),
|
||||||
'MultiPolygon': new Style({
|
'MultiPolygon': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -49,7 +49,7 @@ var styles = {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'Polygon': new Style({
|
'Polygon': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
lineDash: [4],
|
lineDash: [4],
|
||||||
width: 3
|
width: 3
|
||||||
@@ -59,7 +59,7 @@ var styles = {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'GeometryCollection': new Style({
|
'GeometryCollection': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'magenta',
|
color: 'magenta',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
@@ -69,13 +69,13 @@ var styles = {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'magenta'
|
color: 'magenta'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'Circle': new Style({
|
'Circle': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'red',
|
color: 'red',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -10,7 +10,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var view = new View({
|
var view = new View({
|
||||||
@@ -73,7 +73,7 @@ positionFeature.setStyle(new Style({
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#3399CC'
|
color: '#3399CC'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var raster = new TileLayer({
|
var raster = new TileLayer({
|
||||||
@@ -24,20 +24,20 @@ var style = {
|
|||||||
color: 'rgba(255,255,0,0.4)'
|
color: 'rgba(255,255,0,0.4)'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#ff0',
|
color: '#ff0',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'LineString': new Style({
|
'LineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiLineString': new Style({
|
'MultiLineString': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#0f0',
|
color: '#0f0',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
|
|||||||
import TileLayer from '../src/ol/layer/Tile.js';
|
import TileLayer from '../src/ol/layer/Tile.js';
|
||||||
import {fromLonLat} from '../src/ol/proj.js';
|
import {fromLonLat} from '../src/ol/proj.js';
|
||||||
import OSM from '../src/ol/source/OSM.js';
|
import OSM from '../src/ol/source/OSM.js';
|
||||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
var map = new Map({
|
var map = new Map({
|
||||||
@@ -25,7 +25,7 @@ var map = new Map({
|
|||||||
// Create the graticule component
|
// Create the graticule component
|
||||||
var graticule = new Graticule({
|
var graticule = new Graticule({
|
||||||
// the style to use for the lines, optional.
|
// the style to use for the lines, optional.
|
||||||
strokeStyle: new _ol_style_Stroke_({
|
strokeStyle: new Stroke({
|
||||||
color: 'rgba(255,120,0,0.9)',
|
color: 'rgba(255,120,0,0.9)',
|
||||||
width: 2,
|
width: 2,
|
||||||
lineDash: [0.5, 4]
|
lineDash: [0.5, 4]
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import VectorSource from '../src/ol/source/Vector.js';
|
|||||||
import Feature from '../src/ol/Feature.js';
|
import Feature from '../src/ol/Feature.js';
|
||||||
import LineString from '../src/ol/geom/LineString.js';
|
import LineString from '../src/ol/geom/LineString.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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
var raster = new TileLayer({
|
var raster = new TileLayer({
|
||||||
source: new OSM()
|
source: new OSM()
|
||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'black',
|
color: 'black',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 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 @@ var styleFunction = function(feature) {
|
|||||||
var style = styleCache[color];
|
var style = styleCache[color];
|
||||||
if (!style) {
|
if (!style) {
|
||||||
style = new Style({
|
style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: color,
|
color: color,
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -152,7 +152,7 @@ map.on('click', function(evt) {
|
|||||||
displaySnap(evt.coordinate);
|
displaySnap(evt.coordinate);
|
||||||
});
|
});
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: 'rgba(255,0,0,0.9)',
|
color: 'rgba(255,0,0,0.9)',
|
||||||
width: 1
|
width: 1
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ var style = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -45,7 +45,7 @@ var featureOverlay = new VectorLayer({
|
|||||||
source: new VectorSource(),
|
source: new VectorSource(),
|
||||||
map: map,
|
map: map,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ 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 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 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 styleFunction = function(feature) {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: 'rgba(255, 204, 0, 0.2)',
|
color: 'rgba(255, 204, 0, 0.2)',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ var styleFunction = function(feature) {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: [0xff, 0xff, 0x33, opacity]
|
color: [0xff, 0xff, 0x33, opacity]
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#ffffff'
|
color: '#ffffff'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ 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 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 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: 1});
|
var stroke = new Stroke({color: 'black', width: 1});
|
||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
'square': new Style({
|
'square': new Style({
|
||||||
|
|||||||
@@ -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_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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var raster = new TileLayer({
|
var raster = new TileLayer({
|
||||||
@@ -21,7 +21,7 @@ var styleFunction = function(feature) {
|
|||||||
var styles = [
|
var styles = [
|
||||||
// linestring
|
// linestring
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ 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 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 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';
|
||||||
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
|
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
|
||||||
@@ -45,7 +45,7 @@ var map = new Map({
|
|||||||
}),
|
}),
|
||||||
tileUrlFunction: tileUrlFunction
|
tileUrlFunction: tileUrlFunction
|
||||||
}),
|
}),
|
||||||
style: createMapboxStreetsV6Style(Style, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_)
|
style: createMapboxStreetsV6Style(Style, Fill, Stroke, _ol_style_Icon_, _ol_style_Text_)
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
target: 'map',
|
target: 'map',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -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, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_)
|
style: createMapboxStreetsV6Style(Style, Fill, Stroke, _ol_style_Icon_, _ol_style_Text_)
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
target: 'map',
|
target: 'map',
|
||||||
|
|||||||
@@ -12,7 +12,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ var vector = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
@@ -184,14 +184,14 @@ function addInteraction() {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: 'rgba(0, 0, 0, 0.5)',
|
color: 'rgba(0, 0, 0, 0.5)',
|
||||||
lineDash: [10, 10],
|
lineDash: [10, 10],
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(0, 0, 0, 0.7)'
|
color: 'rgba(0, 0, 0, 0.7)'
|
||||||
}),
|
}),
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
|
|||||||
@@ -8,7 +8,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -17,11 +17,11 @@ var styleFunction = (function() {
|
|||||||
var image = new _ol_style_Circle_({
|
var image = new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new _ol_style_Stroke_({color: 'orange', width: 2})
|
stroke: new Stroke({color: 'orange', width: 2})
|
||||||
});
|
});
|
||||||
styles['Point'] = new Style({image: image});
|
styles['Point'] = new Style({image: image});
|
||||||
styles['Polygon'] = new Style({
|
styles['Polygon'] = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 3
|
width: 3
|
||||||
}),
|
}),
|
||||||
@@ -30,13 +30,13 @@ var styleFunction = (function() {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
styles['MultiLineString'] = new Style({
|
styles['MultiLineString'] = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'green',
|
color: 'green',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
styles['MultiPolygon'] = new Style({
|
styles['MultiPolygon'] = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -45,7 +45,7 @@ var styleFunction = (function() {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
styles['default'] = new Style({
|
styles['default'] = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'red',
|
color: 'red',
|
||||||
width: 3
|
width: 3
|
||||||
}),
|
}),
|
||||||
@@ -162,13 +162,13 @@ var overlayStyle = (function() {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [255, 255, 255, 1],
|
color: [255, 255, 255, 1],
|
||||||
width: 5
|
width: 5
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [0, 153, 255, 1],
|
color: [0, 153, 255, 1],
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -178,13 +178,13 @@ var overlayStyle = (function() {
|
|||||||
|
|
||||||
styles['LineString'] = [
|
styles['LineString'] = [
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [255, 255, 255, 1],
|
color: [255, 255, 255, 1],
|
||||||
width: 5
|
width: 5
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [0, 153, 255, 1],
|
color: [0, 153, 255, 1],
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -199,7 +199,7 @@ var overlayStyle = (function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: [0, 153, 255, 1]
|
color: [0, 153, 255, 1]
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [255, 255, 255, 0.75],
|
color: [255, 255, 255, 0.75],
|
||||||
width: 1.5
|
width: 1.5
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var key = 'vector-tiles-5eJz6JX';
|
var key = 'vector-tiles-5eJz6JX';
|
||||||
@@ -21,7 +21,7 @@ var buildingStyle = new Style({
|
|||||||
color: '#666',
|
color: '#666',
|
||||||
opacity: 0.4
|
opacity: 0.4
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#444',
|
color: '#444',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -47,7 +47,7 @@ var roadStyle = function(feature) {
|
|||||||
width = kind == 'highway' ? 1.5 : 1;
|
width = kind == 'highway' ? 1.5 : 1;
|
||||||
}
|
}
|
||||||
style = new Style({
|
style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: color,
|
color: color,
|
||||||
width: width
|
width: width
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var styles = [
|
var styles = [
|
||||||
@@ -18,7 +18,7 @@ var styles = [
|
|||||||
* the style.
|
* the style.
|
||||||
*/
|
*/
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 3
|
width: 3
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ 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 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 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 Stroke({color: 'black', width: 2});
|
||||||
var fill = new Fill({color: 'red'});
|
var fill = new Fill({color: 'red'});
|
||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ 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 Fill({color: 'blue'});
|
var fill = new Fill({color: 'blue'});
|
||||||
var stroke = new _ol_style_Stroke_({color: 'black'});
|
var stroke = new Stroke({color: 'black'});
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
|
|||||||
@@ -10,7 +10,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var raster = new TileLayer({
|
var raster = new TileLayer({
|
||||||
@@ -23,7 +23,7 @@ var vector = new VectorLayer({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var atlasManager = new AtlasManager({
|
var atlasManager = new AtlasManager({
|
||||||
@@ -54,7 +54,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: info.fillColor
|
color: info.fillColor
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: info.strokeColor,
|
color: info.strokeColor,
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -74,7 +74,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: info.fillColor
|
color: info.fillColor
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: info.strokeColor,
|
color: info.strokeColor,
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
|
|||||||
import LineString from '../src/ol/geom/LineString.js';
|
import LineString from '../src/ol/geom/LineString.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_Stroke_ from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ var vector = new VectorLayer({
|
|||||||
wrapX: false
|
wrapX: false
|
||||||
}),
|
}),
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#666666',
|
color: '#666666',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -28,14 +28,14 @@ var styles = {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({color: '#666666'}),
|
fill: new Fill({color: '#666666'}),
|
||||||
stroke: new _ol_style_Stroke_({color: '#bada55', width: 1})
|
stroke: new 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 Fill({color: '#666666'}),
|
fill: new Fill({color: '#666666'}),
|
||||||
stroke: new _ol_style_Stroke_({color: '#bada55', width: 1})
|
stroke: new Stroke({color: '#bada55', width: 1})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
@@ -96,7 +96,7 @@ map.on('click', function(evt) {
|
|||||||
displaySnap(evt.coordinate);
|
displaySnap(evt.coordinate);
|
||||||
});
|
});
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: 'rgba(255,255,0,0.9)',
|
color: 'rgba(255,255,0,0.9)',
|
||||||
width: 3
|
width: 3
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ 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 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 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 style = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,7 +14,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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import 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';
|
||||||
@@ -32,12 +32,12 @@ var nodesLayer = new VectorLayer({
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
fill: new 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 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 Fill({color: 'red'}),
|
fill: new Fill({color: 'red'}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'white',
|
color: 'white',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -52,14 +52,14 @@ var edgesLayer = new VectorLayer({
|
|||||||
source: edges,
|
source: edges,
|
||||||
style: function(f) {
|
style: function(f) {
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
text: new _ol_style_Text_({
|
text: new _ol_style_Text_({
|
||||||
text: f.get('edge').id.toString(),
|
text: f.get('edge').id.toString(),
|
||||||
fill: new Fill({color: 'blue'}),
|
fill: new Fill({color: 'blue'}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'white',
|
color: 'white',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
@@ -74,7 +74,7 @@ var facesLayer = new VectorLayer({
|
|||||||
source: faces,
|
source: faces,
|
||||||
style: function(f) {
|
style: function(f) {
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'black',
|
color: 'black',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -85,7 +85,7 @@ var facesLayer = new VectorLayer({
|
|||||||
font: 'bold 12px sans-serif',
|
font: 'bold 12px sans-serif',
|
||||||
text: f.get('face').id.toString(),
|
text: f.get('face').id.toString(),
|
||||||
fill: new Fill({color: 'green'}),
|
fill: new Fill({color: 'green'}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'white',
|
color: 'white',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ var styleCache = {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(225, 225, 225, 255)'
|
color: 'rgba(225, 225, 225, 255)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(0, 0, 0, 255)',
|
color: 'rgba(0, 0, 0, 255)',
|
||||||
width: 0.4
|
width: 0.4
|
||||||
})
|
})
|
||||||
@@ -33,7 +33,7 @@ var styleCache = {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255, 0, 0, 255)'
|
color: 'rgba(255, 0, 0, 255)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(110, 110, 110, 255)',
|
color: 'rgba(110, 110, 110, 255)',
|
||||||
width: 0.4
|
width: 0.4
|
||||||
})
|
})
|
||||||
@@ -42,7 +42,7 @@ var styleCache = {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(56, 168, 0, 255)'
|
color: 'rgba(56, 168, 0, 255)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(110, 110, 110, 255)',
|
color: 'rgba(110, 110, 110, 255)',
|
||||||
width: 0
|
width: 0
|
||||||
})
|
})
|
||||||
@@ -51,7 +51,7 @@ var styleCache = {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(168, 112, 0, 255)'
|
color: 'rgba(168, 112, 0, 255)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(110, 110, 110, 255)',
|
color: 'rgba(110, 110, 110, 255)',
|
||||||
width: 0.4
|
width: 0.4
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ var labelStyle = new Style({
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#000'
|
color: '#000'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -51,7 +51,7 @@ var countryStyle = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,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 _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||||
import 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 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';
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ var createTextStyle = function(feature, resolution, dom) {
|
|||||||
font: font,
|
font: font,
|
||||||
text: getText(feature, resolution, dom),
|
text: getText(feature, resolution, dom),
|
||||||
fill: new Fill({color: fillColor}),
|
fill: new Fill({color: fillColor}),
|
||||||
stroke: new _ol_style_Stroke_({color: outlineColor, width: outlineWidth}),
|
stroke: new Stroke({color: outlineColor, width: outlineWidth}),
|
||||||
offsetX: offsetX,
|
offsetX: offsetX,
|
||||||
offsetY: offsetY,
|
offsetY: offsetY,
|
||||||
placement: placement,
|
placement: placement,
|
||||||
@@ -129,7 +129,7 @@ var createTextStyle = function(feature, resolution, dom) {
|
|||||||
// Polygons
|
// Polygons
|
||||||
function polygonStyleFunction(feature, resolution) {
|
function polygonStyleFunction(feature, resolution) {
|
||||||
return new Style({
|
return new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -152,7 +152,7 @@ var vectorPolygons = new VectorLayer({
|
|||||||
// Lines
|
// Lines
|
||||||
function lineStyleFunction(feature, resolution) {
|
function lineStyleFunction(feature, resolution) {
|
||||||
return new Style({
|
return new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'green',
|
color: 'green',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
@@ -175,7 +175,7 @@ function pointStyleFunction(feature, resolution) {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: new 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 Stroke({color: 'red', width: 1})
|
||||||
}),
|
}),
|
||||||
text: createTextStyle(feature, resolution, myDom.points)
|
text: createTextStyle(feature, resolution, myDom.points)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ var style = new Style({
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -22,7 +22,7 @@ var style = new Style({
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#000'
|
color: '#000'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -50,7 +50,7 @@ var map = new Map({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var highlightStyle = new Style({
|
var highlightStyle = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -62,7 +62,7 @@ var highlightStyle = new Style({
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#000'
|
color: '#000'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#f00',
|
color: '#f00',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ 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 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 Stroke from '../src/ol/style/Stroke.js';
|
||||||
import Style from '../src/ol/style/Style.js';
|
import Style from '../src/ol/style/Style.js';
|
||||||
|
|
||||||
var map;
|
var map;
|
||||||
@@ -18,7 +18,7 @@ var map;
|
|||||||
var styles = {
|
var styles = {
|
||||||
'amenity': {
|
'amenity': {
|
||||||
'parking': new Style({
|
'parking': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(170, 170, 170, 1.0)',
|
color: 'rgba(170, 170, 170, 1.0)',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -30,7 +30,7 @@ var styles = {
|
|||||||
'building': {
|
'building': {
|
||||||
'.*': new Style({
|
'.*': new Style({
|
||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(246, 99, 79, 1.0)',
|
color: 'rgba(246, 99, 79, 1.0)',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
@@ -41,13 +41,13 @@ var styles = {
|
|||||||
},
|
},
|
||||||
'highway': {
|
'highway': {
|
||||||
'service': new Style({
|
'service': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(255, 255, 255, 1.0)',
|
color: 'rgba(255, 255, 255, 1.0)',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'.*': new Style({
|
'.*': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(255, 255, 255, 1.0)',
|
color: 'rgba(255, 255, 255, 1.0)',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -55,7 +55,7 @@ var styles = {
|
|||||||
},
|
},
|
||||||
'landuse': {
|
'landuse': {
|
||||||
'forest|grass|allotments': new Style({
|
'forest|grass|allotments': new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(140, 208, 95, 1.0)',
|
color: 'rgba(140, 208, 95, 1.0)',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -7,7 +7,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_Stroke_ from '../src/ol/style/Stroke.js';
|
import 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 vectorSource = new VectorSource();
|
|||||||
var vector = new VectorLayer({
|
var vector = new VectorLayer({
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(0, 0, 255, 1.0)',
|
color: 'rgba(0, 0, 255, 1.0)',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
|||||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.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_Stroke_ from '../src/ol/style/Stroke.js';
|
import 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 vectorSource = new VectorSource({
|
|||||||
var vector = new VectorLayer({
|
var vector = new VectorLayer({
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(0, 0, 255, 1.0)',
|
color: 'rgba(0, 0, 255, 1.0)',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ 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 Fill from './style/Fill.js';
|
import Fill from './style/Fill.js';
|
||||||
import _ol_style_Stroke_ from './style/Stroke.js';
|
import Stroke from './style/Stroke.js';
|
||||||
import _ol_style_Text_ from './style/Text.js';
|
import _ol_style_Text_ from './style/Text.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ import _ol_style_Text_ from './style/Text.js';
|
|||||||
* @private
|
* @private
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
var DEFAULT_STROKE_STYLE = new _ol_style_Stroke_({
|
var DEFAULT_STROKE_STYLE = new Stroke({
|
||||||
color: 'rgba(0,0,0,0.2)'
|
color: 'rgba(0,0,0,0.2)'
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ var Graticule = function(opt_options) {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0,0,0,1)'
|
color: 'rgba(0,0,0,1)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(255,255,255,1)',
|
color: 'rgba(255,255,255,1)',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -306,7 +306,7 @@ var Graticule = function(opt_options) {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0,0,0,1)'
|
color: 'rgba(0,0,0,1)'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'rgba(255,255,255,1)',
|
color: 'rgba(255,255,255,1)',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ 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';
|
||||||
import _ol_style_Stroke_ from '../style/Stroke.js';
|
import Stroke from '../style/Stroke.js';
|
||||||
import Style from '../style/Style.js';
|
import Style from '../style/Style.js';
|
||||||
import _ol_style_Text_ from '../style/Text.js';
|
import _ol_style_Text_ from '../style/Text.js';
|
||||||
import _ol_xml_ from '../xml.js';
|
import _ol_xml_ from '../xml.js';
|
||||||
@@ -221,7 +221,7 @@ KML.createStyleDefaults_ = function() {
|
|||||||
* @type {ol.style.Stroke}
|
* @type {ol.style.Stroke}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
KML.DEFAULT_STROKE_STYLE_ = new _ol_style_Stroke_({
|
KML.DEFAULT_STROKE_STYLE_ = new Stroke({
|
||||||
color: KML.DEFAULT_COLOR_,
|
color: KML.DEFAULT_COLOR_,
|
||||||
width: 1
|
width: 1
|
||||||
});
|
});
|
||||||
@@ -231,7 +231,7 @@ KML.createStyleDefaults_ = function() {
|
|||||||
* @type {ol.style.Stroke}
|
* @type {ol.style.Stroke}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
KML.DEFAULT_TEXT_STROKE_STYLE_ = new _ol_style_Stroke_({
|
KML.DEFAULT_TEXT_STROKE_STYLE_ = new Stroke({
|
||||||
color: [51, 51, 51, 1],
|
color: [51, 51, 51, 1],
|
||||||
width: 2
|
width: 2
|
||||||
});
|
});
|
||||||
@@ -694,7 +694,7 @@ KML.LineStyleParser_ = function(node, objectStack) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var styleObject = objectStack[objectStack.length - 1];
|
var styleObject = objectStack[objectStack.length - 1];
|
||||||
var strokeStyle = new _ol_style_Stroke_({
|
var strokeStyle = new Stroke({
|
||||||
color: /** @type {ol.Color} */
|
color: /** @type {ol.Color} */
|
||||||
('color' in object ? object['color'] : KML.DEFAULT_COLOR_),
|
('color' in object ? object['color'] : KML.DEFAULT_COLOR_),
|
||||||
width: /** @type {number} */ ('width' in object ? object['width'] : 1)
|
width: /** @type {number} */ ('width' in object ? object['width'] : 1)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../webgl/po
|
|||||||
import _ol_render_webgl_LineStringReplay_ from '../webgl/LineStringReplay.js';
|
import _ol_render_webgl_LineStringReplay_ from '../webgl/LineStringReplay.js';
|
||||||
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
|
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
|
||||||
import _ol_render_webgl_ from '../webgl.js';
|
import _ol_render_webgl_ from '../webgl.js';
|
||||||
import _ol_style_Stroke_ from '../../style/Stroke.js';
|
import Stroke from '../../style/Stroke.js';
|
||||||
import LinkedList from '../../structs/LinkedList.js';
|
import LinkedList from '../../structs/LinkedList.js';
|
||||||
import RBush from '../../structs/RBush.js';
|
import RBush from '../../structs/RBush.js';
|
||||||
import _ol_webgl_ from '../../webgl.js';
|
import _ol_webgl_ from '../../webgl.js';
|
||||||
@@ -1063,7 +1063,7 @@ _ol_render_webgl_PolygonReplay_.prototype.setFillStrokeStyle = function(fillStyl
|
|||||||
if (strokeStyle) {
|
if (strokeStyle) {
|
||||||
this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);
|
this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);
|
||||||
} else {
|
} else {
|
||||||
var nullStrokeStyle = new _ol_style_Stroke_({
|
var nullStrokeStyle = new Stroke({
|
||||||
color: [0, 0, 0, 0],
|
color: [0, 0, 0, 0],
|
||||||
lineWidth: 0
|
lineWidth: 0
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {getUid} from '../index.js';
|
|||||||
* @param {olx.style.StrokeOptions=} opt_options Options.
|
* @param {olx.style.StrokeOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_style_Stroke_ = function(opt_options) {
|
var Stroke = function(opt_options) {
|
||||||
|
|
||||||
var options = opt_options || {};
|
var options = opt_options || {};
|
||||||
|
|
||||||
@@ -73,9 +73,9 @@ var _ol_style_Stroke_ = function(opt_options) {
|
|||||||
* @return {ol.style.Stroke} The cloned style.
|
* @return {ol.style.Stroke} The cloned style.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.clone = function() {
|
Stroke.prototype.clone = function() {
|
||||||
var color = this.getColor();
|
var color = this.getColor();
|
||||||
return new _ol_style_Stroke_({
|
return new Stroke({
|
||||||
color: (color && color.slice) ? color.slice() : color || undefined,
|
color: (color && color.slice) ? color.slice() : color || undefined,
|
||||||
lineCap: this.getLineCap(),
|
lineCap: this.getLineCap(),
|
||||||
lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,
|
lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,
|
||||||
@@ -92,7 +92,7 @@ _ol_style_Stroke_.prototype.clone = function() {
|
|||||||
* @return {ol.Color|ol.ColorLike} Color.
|
* @return {ol.Color|ol.ColorLike} Color.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getColor = function() {
|
Stroke.prototype.getColor = function() {
|
||||||
return this.color_;
|
return this.color_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ _ol_style_Stroke_.prototype.getColor = function() {
|
|||||||
* @return {string|undefined} Line cap.
|
* @return {string|undefined} Line cap.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getLineCap = function() {
|
Stroke.prototype.getLineCap = function() {
|
||||||
return this.lineCap_;
|
return this.lineCap_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ _ol_style_Stroke_.prototype.getLineCap = function() {
|
|||||||
* @return {Array.<number>} Line dash.
|
* @return {Array.<number>} Line dash.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getLineDash = function() {
|
Stroke.prototype.getLineDash = function() {
|
||||||
return this.lineDash_;
|
return this.lineDash_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ _ol_style_Stroke_.prototype.getLineDash = function() {
|
|||||||
* @return {number|undefined} Line dash offset.
|
* @return {number|undefined} Line dash offset.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getLineDashOffset = function() {
|
Stroke.prototype.getLineDashOffset = function() {
|
||||||
return this.lineDashOffset_;
|
return this.lineDashOffset_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ _ol_style_Stroke_.prototype.getLineDashOffset = function() {
|
|||||||
* @return {string|undefined} Line join.
|
* @return {string|undefined} Line join.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getLineJoin = function() {
|
Stroke.prototype.getLineJoin = function() {
|
||||||
return this.lineJoin_;
|
return this.lineJoin_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ _ol_style_Stroke_.prototype.getLineJoin = function() {
|
|||||||
* @return {number|undefined} Miter limit.
|
* @return {number|undefined} Miter limit.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getMiterLimit = function() {
|
Stroke.prototype.getMiterLimit = function() {
|
||||||
return this.miterLimit_;
|
return this.miterLimit_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ _ol_style_Stroke_.prototype.getMiterLimit = function() {
|
|||||||
* @return {number|undefined} Width.
|
* @return {number|undefined} Width.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getWidth = function() {
|
Stroke.prototype.getWidth = function() {
|
||||||
return this.width_;
|
return this.width_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ _ol_style_Stroke_.prototype.getWidth = function() {
|
|||||||
* @param {ol.Color|ol.ColorLike} color Color.
|
* @param {ol.Color|ol.ColorLike} color Color.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setColor = function(color) {
|
Stroke.prototype.setColor = function(color) {
|
||||||
this.color_ = color;
|
this.color_ = color;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -175,7 +175,7 @@ _ol_style_Stroke_.prototype.setColor = function(color) {
|
|||||||
* @param {string|undefined} lineCap Line cap.
|
* @param {string|undefined} lineCap Line cap.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setLineCap = function(lineCap) {
|
Stroke.prototype.setLineCap = function(lineCap) {
|
||||||
this.lineCap_ = lineCap;
|
this.lineCap_ = lineCap;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -193,7 +193,7 @@ _ol_style_Stroke_.prototype.setLineCap = function(lineCap) {
|
|||||||
* @param {Array.<number>} lineDash Line dash.
|
* @param {Array.<number>} lineDash Line dash.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setLineDash = function(lineDash) {
|
Stroke.prototype.setLineDash = function(lineDash) {
|
||||||
this.lineDash_ = lineDash;
|
this.lineDash_ = lineDash;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -205,7 +205,7 @@ _ol_style_Stroke_.prototype.setLineDash = function(lineDash) {
|
|||||||
* @param {number|undefined} lineDashOffset Line dash offset.
|
* @param {number|undefined} lineDashOffset Line dash offset.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setLineDashOffset = function(lineDashOffset) {
|
Stroke.prototype.setLineDashOffset = function(lineDashOffset) {
|
||||||
this.lineDashOffset_ = lineDashOffset;
|
this.lineDashOffset_ = lineDashOffset;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -217,7 +217,7 @@ _ol_style_Stroke_.prototype.setLineDashOffset = function(lineDashOffset) {
|
|||||||
* @param {string|undefined} lineJoin Line join.
|
* @param {string|undefined} lineJoin Line join.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setLineJoin = function(lineJoin) {
|
Stroke.prototype.setLineJoin = function(lineJoin) {
|
||||||
this.lineJoin_ = lineJoin;
|
this.lineJoin_ = lineJoin;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -229,7 +229,7 @@ _ol_style_Stroke_.prototype.setLineJoin = function(lineJoin) {
|
|||||||
* @param {number|undefined} miterLimit Miter limit.
|
* @param {number|undefined} miterLimit Miter limit.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setMiterLimit = function(miterLimit) {
|
Stroke.prototype.setMiterLimit = function(miterLimit) {
|
||||||
this.miterLimit_ = miterLimit;
|
this.miterLimit_ = miterLimit;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -241,7 +241,7 @@ _ol_style_Stroke_.prototype.setMiterLimit = function(miterLimit) {
|
|||||||
* @param {number|undefined} width Width.
|
* @param {number|undefined} width Width.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.setWidth = function(width) {
|
Stroke.prototype.setWidth = function(width) {
|
||||||
this.width_ = width;
|
this.width_ = width;
|
||||||
this.checksum_ = undefined;
|
this.checksum_ = undefined;
|
||||||
};
|
};
|
||||||
@@ -250,7 +250,7 @@ _ol_style_Stroke_.prototype.setWidth = function(width) {
|
|||||||
/**
|
/**
|
||||||
* @return {string} The checksum.
|
* @return {string} The checksum.
|
||||||
*/
|
*/
|
||||||
_ol_style_Stroke_.prototype.getChecksum = function() {
|
Stroke.prototype.getChecksum = function() {
|
||||||
if (this.checksum_ === undefined) {
|
if (this.checksum_ === undefined) {
|
||||||
this.checksum_ = 's';
|
this.checksum_ = 's';
|
||||||
if (this.color_) {
|
if (this.color_) {
|
||||||
@@ -279,4 +279,4 @@ _ol_style_Stroke_.prototype.getChecksum = function() {
|
|||||||
|
|
||||||
return this.checksum_;
|
return this.checksum_;
|
||||||
};
|
};
|
||||||
export default _ol_style_Stroke_;
|
export default Stroke;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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 Fill from '../style/Fill.js';
|
import Fill from '../style/Fill.js';
|
||||||
import _ol_style_Stroke_ from '../style/Stroke.js';
|
import Stroke from '../style/Stroke.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
@@ -325,7 +325,7 @@ Style.defaultFunction = function(feature, resolution) {
|
|||||||
var fill = new 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 Stroke({
|
||||||
color: '#3399CC',
|
color: '#3399CC',
|
||||||
width: 1.25
|
width: 1.25
|
||||||
});
|
});
|
||||||
@@ -367,13 +367,13 @@ Style.createDefaultEditing = function() {
|
|||||||
|
|
||||||
styles[GeometryType.LINE_STRING] = [
|
styles[GeometryType.LINE_STRING] = [
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: white,
|
color: white,
|
||||||
width: width + 2
|
width: width + 2
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: blue,
|
color: blue,
|
||||||
width: width
|
width: width
|
||||||
})
|
})
|
||||||
@@ -395,7 +395,7 @@ Style.createDefaultEditing = function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: blue
|
color: blue
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: white,
|
color: white,
|
||||||
width: width / 2
|
width: width / 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import View from '../../../../src/ol/View.js';
|
|||||||
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
|
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
|
||||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||||
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
|
import 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 @@ describe('layer clipping', function() {
|
|||||||
]).transform('EPSG:4326', 'EPSG:3857');
|
]).transform('EPSG:4326', 'EPSG:3857');
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
width: 2,
|
width: 2,
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ 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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ describe('ol.rendering.layer.Tile', function() {
|
|||||||
radius: 5,
|
radius: 5,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'yellow'}),
|
fill: new Fill({color: 'yellow'}),
|
||||||
stroke: new _ol_style_Stroke_({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
}));
|
}));
|
||||||
e.vectorContext.drawPoint(new Point(
|
e.vectorContext.drawPoint(new Point(
|
||||||
transform([-123, 38], 'EPSG:4326', 'EPSG:3857')));
|
transform([-123, 38], 'EPSG:4326', 'EPSG:3857')));
|
||||||
|
|||||||
@@ -10,7 +10,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 _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
||||||
import 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 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';
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine.setStyle(new Style({
|
smallLine.setStyle(new Style({
|
||||||
zIndex: -99,
|
zIndex: -99,
|
||||||
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
|
stroke: new Stroke({width: 75, color: 'red'})
|
||||||
}));
|
}));
|
||||||
source.addFeature(smallLine);
|
source.addFeature(smallLine);
|
||||||
addPolygon(100);
|
addPolygon(100);
|
||||||
@@ -107,7 +107,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine.setStyle(new Style({
|
smallLine.setStyle(new Style({
|
||||||
zIndex: -99,
|
zIndex: -99,
|
||||||
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
|
stroke: new Stroke({width: 75, color: 'red'})
|
||||||
}));
|
}));
|
||||||
source.addFeature(smallLine);
|
source.addFeature(smallLine);
|
||||||
addPolygon(100);
|
addPolygon(100);
|
||||||
@@ -134,10 +134,10 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine.setStyle([
|
smallLine.setStyle([
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
|
stroke: new Stroke({width: 75, color: 'red'})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 45, color: 'white'})
|
stroke: new Stroke({width: 45, color: 'white'})
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
source.addFeature(smallLine);
|
source.addFeature(smallLine);
|
||||||
@@ -147,10 +147,10 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine2.setStyle([
|
smallLine2.setStyle([
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 35, color: 'blue'})
|
stroke: new Stroke({width: 35, color: 'blue'})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 15, color: 'green'})
|
stroke: new Stroke({width: 15, color: 'green'})
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
source.addFeature(smallLine2);
|
source.addFeature(smallLine2);
|
||||||
@@ -173,10 +173,10 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine.setStyle([
|
smallLine.setStyle([
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
|
stroke: new Stroke({width: 75, color: 'red'})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 45, color: 'white'})
|
stroke: new Stroke({width: 45, color: 'white'})
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
source.addFeature(smallLine);
|
source.addFeature(smallLine);
|
||||||
@@ -186,10 +186,10 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
smallLine2.setStyle([
|
smallLine2.setStyle([
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 35, color: 'blue'})
|
stroke: new Stroke({width: 35, color: 'blue'})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
stroke: new _ol_style_Stroke_({width: 15, color: 'green'})
|
stroke: new Stroke({width: 15, color: 'green'})
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
source.addFeature(smallLine2);
|
source.addFeature(smallLine2);
|
||||||
@@ -213,7 +213,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
map.addLayer(new VectorLayer({
|
map.addLayer(new VectorLayer({
|
||||||
source: source,
|
source: source,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
width: 2,
|
width: 2,
|
||||||
color: 'black'
|
color: 'black'
|
||||||
})
|
})
|
||||||
@@ -234,7 +234,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
renderMode: 'image',
|
renderMode: 'image',
|
||||||
source: source,
|
source: source,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
width: 2,
|
width: 2,
|
||||||
color: 'black'
|
color: 'black'
|
||||||
})
|
})
|
||||||
@@ -258,7 +258,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
fill: new 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 Stroke({
|
||||||
width: 2,
|
width: 2,
|
||||||
color: 'black'
|
color: 'black'
|
||||||
})
|
})
|
||||||
@@ -286,7 +286,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
map.addLayer(new VectorLayer({
|
map.addLayer(new VectorLayer({
|
||||||
source: source,
|
source: source,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#3399CC',
|
color: '#3399CC',
|
||||||
width: 1.25
|
width: 1.25
|
||||||
})
|
})
|
||||||
@@ -310,7 +310,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
map.addLayer(new VectorLayer({
|
map.addLayer(new VectorLayer({
|
||||||
source: source,
|
source: source,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#3399CC',
|
color: '#3399CC',
|
||||||
width: 1.25
|
width: 1.25
|
||||||
})
|
})
|
||||||
@@ -351,7 +351,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
style: function(feature) {
|
style: function(feature) {
|
||||||
alternateColor();
|
alternateColor();
|
||||||
return new Style({
|
return new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: alternateColor(),
|
color: alternateColor(),
|
||||||
width: 1.25
|
width: 1.25
|
||||||
}),
|
}),
|
||||||
@@ -402,7 +402,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
style: function(feature) {
|
style: function(feature) {
|
||||||
alternateColor();
|
alternateColor();
|
||||||
return new Style({
|
return new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: alternateColor(),
|
color: alternateColor(),
|
||||||
width: 1.25
|
width: 1.25
|
||||||
}),
|
}),
|
||||||
@@ -535,7 +535,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
|
|
||||||
it('renders partially out-of-view polygons with a fill and stroke', function(done) {
|
it('renders partially out-of-view polygons with a fill and stroke', function(done) {
|
||||||
layer.setStyle(new Style({
|
layer.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [0, 0, 0, 1],
|
color: [0, 0, 0, 1],
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
@@ -563,7 +563,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
|
|
||||||
it('renders partially out-of-view polygons with a stroke', function(done) {
|
it('renders partially out-of-view polygons with a stroke', function(done) {
|
||||||
layer.setStyle(new Style({
|
layer.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [0, 0, 0, 1],
|
color: [0, 0, 0, 1],
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
@@ -726,7 +726,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -766,7 +766,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -808,7 +808,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
zIndex: feature.get('zIndex'),
|
zIndex: feature.get('zIndex'),
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -846,7 +846,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
@@ -876,7 +876,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
point.setStyle(new Style({
|
point.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -886,7 +886,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
[center[0] + 650, center[1] - 200]
|
[center[0] + 650, center[1] - 200]
|
||||||
]));
|
]));
|
||||||
line.setStyle(new Style({
|
line.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#CCC',
|
color: '#CCC',
|
||||||
width: 12
|
width: 12
|
||||||
}),
|
}),
|
||||||
@@ -919,7 +919,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
point.setStyle(new Style({
|
point.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -929,7 +929,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
[center[0] + 650, center[1] - 200]
|
[center[0] + 650, center[1] - 200]
|
||||||
]));
|
]));
|
||||||
line.setStyle(new Style({
|
line.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#CCC',
|
color: '#CCC',
|
||||||
width: 12
|
width: 12
|
||||||
}),
|
}),
|
||||||
@@ -963,7 +963,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -974,7 +974,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
]));
|
]));
|
||||||
line.setStyle(new Style({
|
line.setStyle(new Style({
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#CCC',
|
color: '#CCC',
|
||||||
width: 12
|
width: 12
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ 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 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 Stroke from '../../../src/ol/style/Stroke.js';
|
||||||
import Style from '../../../src/ol/style/Style.js';
|
import Style from '../../../src/ol/style/Style.js';
|
||||||
|
|
||||||
function getContext() {
|
function getContext() {
|
||||||
@@ -58,7 +58,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'red',
|
color: 'red',
|
||||||
width: 14
|
width: 14
|
||||||
})
|
})
|
||||||
@@ -82,7 +82,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
lineCap: 'butt',
|
lineCap: 'butt',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
width: 14
|
width: 14
|
||||||
@@ -107,7 +107,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
lineJoin: 'bevel',
|
lineJoin: 'bevel',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
width: 14
|
width: 14
|
||||||
@@ -132,7 +132,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 8
|
width: 8
|
||||||
}),
|
}),
|
||||||
@@ -161,7 +161,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
lineDash: [10, 5]
|
lineDash: [10, 5]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -186,7 +186,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
lineDash: [10, 5],
|
lineDash: [10, 5],
|
||||||
lineDashOffset: 5
|
lineDashOffset: 5
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ 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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.rendering.style.Circle', function() {
|
describe('ol.rendering.style.Circle', function() {
|
||||||
@@ -93,7 +93,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#91E339'
|
color: '#91E339'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -110,7 +110,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#5447E6'
|
color: '#5447E6'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
@@ -127,7 +127,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#92A8A6'
|
color: '#92A8A6'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -141,7 +141,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,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#256308',
|
color: '#256308',
|
||||||
width: 1
|
width: 1
|
||||||
})
|
})
|
||||||
@@ -158,7 +158,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#256308',
|
color: '#256308',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
@@ -175,7 +175,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
fill: new 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 Stroke({
|
||||||
color: '#256308',
|
color: '#256308',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.rendering.style.LineString', function() {
|
describe('ol.rendering.style.LineString', function() {
|
||||||
@@ -49,7 +49,7 @@ describe('ol.rendering.style.LineString', function() {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3})
|
stroke: new Stroke({color: '#DE213A', width: 3})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ describe('ol.rendering.style.LineString', function() {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
|
stroke: new Stroke({color: '#9696EB', width: 1})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
|
|
||||||
@@ -69,9 +69,9 @@ describe('ol.rendering.style.LineString', function() {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
feature.setStyle([new Style({
|
feature.setStyle([new Style({
|
||||||
stroke: new _ol_style_Stroke_({color: '#F2F211', width: 5})
|
stroke: new Stroke({color: '#F2F211', width: 5})
|
||||||
}), new Style({
|
}), new Style({
|
||||||
stroke: new _ol_style_Stroke_({color: '#292921', width: 1})
|
stroke: new Stroke({color: '#292921', width: 1})
|
||||||
})]);
|
})]);
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ describe('ol.rendering.style.LineString', function() {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
width: 2,
|
width: 2,
|
||||||
lineCap: 'square',
|
lineCap: 'square',
|
||||||
@@ -97,7 +97,7 @@ describe('ol.rendering.style.LineString', function() {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
width: 2,
|
width: 2,
|
||||||
lineCap: 'square',
|
lineCap: 'square',
|
||||||
|
|||||||
@@ -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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.rendering.style.Polygon', function() {
|
describe('ol.rendering.style.Polygon', function() {
|
||||||
@@ -104,7 +104,7 @@ describe('ol.rendering.style.Polygon', function() {
|
|||||||
describe('different types with stroke', function() {
|
describe('different types with stroke', function() {
|
||||||
|
|
||||||
function createFeatures() {
|
function createFeatures() {
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
width: 10,
|
width: 10,
|
||||||
color: '#000',
|
color: '#000',
|
||||||
lineJoin: 'round',
|
lineJoin: 'round',
|
||||||
@@ -237,7 +237,7 @@ describe('ol.rendering.style.Polygon', function() {
|
|||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
fill: new Fill({color: '#9696EB'}),
|
fill: new Fill({color: '#9696EB'}),
|
||||||
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
|
stroke: new Stroke({color: '#9696EB', width: 1})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ describe('ol.rendering.style.Polygon', function() {
|
|||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
fill: new 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 Stroke({color: '#DE213A', width: 3})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ describe('ol.rendering.style.Polygon', function() {
|
|||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
fill: new 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 Stroke({color: '#032E17', width: 2})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
}
|
}
|
||||||
@@ -323,7 +323,7 @@ describe('ol.rendering.style.Polygon', function() {
|
|||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
fill: new Fill({color: createPattern()}),
|
fill: new Fill({color: createPattern()}),
|
||||||
stroke: new _ol_style_Stroke_({color: createRainbowGradient(), width: 3})
|
stroke: new Stroke({color: createRainbowGradient(), width: 3})
|
||||||
}));
|
}));
|
||||||
vectorSource.addFeature(feature);
|
vectorSource.addFeature(feature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import VectorSource from '../../../../src/ol/source/Vector.js';
|
|||||||
import 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.rendering.style.RegularShape', function() {
|
describe('ol.rendering.style.RegularShape', function() {
|
||||||
@@ -108,7 +108,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
|||||||
|
|
||||||
|
|
||||||
describe('#render', function() {
|
describe('#render', function() {
|
||||||
var stroke = new _ol_style_Stroke_({width: 2});
|
var stroke = new Stroke({width: 2});
|
||||||
var fill = new Fill({color: 'red'});
|
var fill = new Fill({color: 'red'});
|
||||||
|
|
||||||
it('tests the canvas renderer', function(done) {
|
it('tests the canvas renderer', function(done) {
|
||||||
@@ -119,7 +119,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
|||||||
|
|
||||||
it('supports lineDash', function(done) {
|
it('supports lineDash', function(done) {
|
||||||
createMap('canvas');
|
createMap('canvas');
|
||||||
createFeatures(new _ol_style_Stroke_({
|
createFeatures(new Stroke({
|
||||||
lineDash: [10, 5]
|
lineDash: [10, 5]
|
||||||
}));
|
}));
|
||||||
expectResemble(map, 'rendering/ol/style/expected/regularshape-canvas-linedash.png', 5, done);
|
expectResemble(map, 'rendering/ol/style/expected/regularshape-canvas-linedash.png', 5, done);
|
||||||
@@ -127,7 +127,7 @@ describe('ol.rendering.style.RegularShape', function() {
|
|||||||
|
|
||||||
it('supports lineDashOffset', function(done) {
|
it('supports lineDashOffset', function(done) {
|
||||||
createMap('canvas');
|
createMap('canvas');
|
||||||
createFeatures(new _ol_style_Stroke_({
|
createFeatures(new Stroke({
|
||||||
lineDash: [10, 5],
|
lineDash: [10, 5],
|
||||||
lineDashOffset: 5
|
lineDashOffset: 5
|
||||||
}));
|
}));
|
||||||
@@ -143,7 +143,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 Stroke();
|
||||||
var fill = new Fill();
|
var fill = new Fill();
|
||||||
|
|
||||||
it('tests the canvas renderer', function(done) {
|
it('tests the canvas renderer', function(done) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ 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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
describe('ol.rendering.style.Text', function() {
|
describe('ol.rendering.style.Text', function() {
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ describe('ol.rendering.style.Text', function() {
|
|||||||
color: 'red',
|
color: 'red',
|
||||||
font: '12px sans-serif'
|
font: '12px sans-serif'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#000',
|
color: '#000',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -89,7 +89,7 @@ describe('ol.rendering.style.Text', function() {
|
|||||||
rotateWithView: true,
|
rotateWithView: true,
|
||||||
text: 'hello',
|
text: 'hello',
|
||||||
font: '10px sans-serif',
|
font: '10px sans-serif',
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: [10, 10, 10, 0.5]
|
color: [10, 10, 10, 0.5]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -108,7 +108,7 @@ describe('ol.rendering.style.Text', function() {
|
|||||||
var geom = new LineString();
|
var geom = new LineString();
|
||||||
geom.setFlatCoordinates('XY', coords);
|
geom.setFlatCoordinates('XY', coords);
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: 'red'
|
color: 'red'
|
||||||
}),
|
}),
|
||||||
text: new _ol_style_Text_({
|
text: new _ol_style_Text_({
|
||||||
@@ -118,7 +118,7 @@ describe('ol.rendering.style.Text', function() {
|
|||||||
textAlign: textAlign,
|
textAlign: textAlign,
|
||||||
maxAngle: maxAngle,
|
maxAngle: maxAngle,
|
||||||
placement: 'line',
|
placement: 'line',
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: strokeColor || 'white',
|
color: strokeColor || 'white',
|
||||||
width: strokeWidth
|
width: strokeWidth
|
||||||
})
|
})
|
||||||
@@ -339,14 +339,14 @@ describe('ol.rendering.style.Text', function() {
|
|||||||
features[1].getStyle().getText().setBackgroundFill(new 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 Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 3
|
width: 3
|
||||||
}));
|
}));
|
||||||
features[2].getStyle().getText().setBackgroundFill(new 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 Stroke({
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
width: 3
|
width: 3
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ 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';
|
||||||
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
|
import 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';
|
||||||
import _ol_xml_ from '../../../../src/ol/xml.js';
|
import _ol_xml_ from '../../../../src/ol/xml.js';
|
||||||
@@ -1978,7 +1978,7 @@ describe('ol.format.KML', function() {
|
|||||||
expect(style.getFill()).to.be(KML.DEFAULT_FILL_STYLE_);
|
expect(style.getFill()).to.be(KML.DEFAULT_FILL_STYLE_);
|
||||||
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();
|
||||||
expect(strokeStyle).to.be.an(_ol_style_Stroke_);
|
expect(strokeStyle).to.be.an(Stroke);
|
||||||
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
||||||
expect(strokeStyle.getWidth()).to.be(9);
|
expect(strokeStyle.getWidth()).to.be(9);
|
||||||
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
||||||
@@ -2049,7 +2049,7 @@ describe('ol.format.KML', function() {
|
|||||||
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();
|
||||||
expect(strokeStyle).to.be.an(_ol_style_Stroke_);
|
expect(strokeStyle).to.be.an(Stroke);
|
||||||
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
||||||
expect(strokeStyle.getWidth()).to.be(9);
|
expect(strokeStyle.getWidth()).to.be(9);
|
||||||
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
||||||
@@ -2086,7 +2086,7 @@ describe('ol.format.KML', function() {
|
|||||||
expect(style.getFill()).to.be(null);
|
expect(style.getFill()).to.be(null);
|
||||||
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();
|
||||||
expect(strokeStyle).to.be.an(_ol_style_Stroke_);
|
expect(strokeStyle).to.be.an(Stroke);
|
||||||
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
expect(strokeStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
|
||||||
expect(strokeStyle.getWidth()).to.be(9);
|
expect(strokeStyle.getWidth()).to.be(9);
|
||||||
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
expect(style.getText()).to.be(KML.DEFAULT_TEXT_STYLE_);
|
||||||
@@ -2393,7 +2393,7 @@ describe('ol.format.KML', function() {
|
|||||||
|
|
||||||
it('can write an feature\'s stroke style', function() {
|
it('can write an feature\'s stroke style', function() {
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#112233',
|
color: '#112233',
|
||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Graticule from '../../../src/ol/Graticule.js';
|
import Graticule from '../../../src/ol/Graticule.js';
|
||||||
import Map from '../../../src/ol/Map.js';
|
import Map from '../../../src/ol/Map.js';
|
||||||
import {get as getProjection} from '../../../src/ol/proj.js';
|
import {get as getProjection} from '../../../src/ol/proj.js';
|
||||||
import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js';
|
import 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';
|
||||||
|
|
||||||
describe('ol.Graticule', function() {
|
describe('ol.Graticule', function() {
|
||||||
@@ -54,12 +54,12 @@ describe('ol.Graticule', function() {
|
|||||||
var actualStyle = graticule.strokeStyle_;
|
var actualStyle = graticule.strokeStyle_;
|
||||||
|
|
||||||
expect(actualStyle).not.to.be(undefined);
|
expect(actualStyle).not.to.be(undefined);
|
||||||
expect(actualStyle instanceof _ol_style_Stroke_).to.be(true);
|
expect(actualStyle instanceof Stroke).to.be(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can be configured with a stroke style', function() {
|
it('can be configured with a stroke style', function() {
|
||||||
createGraticule();
|
createGraticule();
|
||||||
var customStrokeStyle = new _ol_style_Stroke_({
|
var customStrokeStyle = new Stroke({
|
||||||
color: 'rebeccapurple'
|
color: 'rebeccapurple'
|
||||||
});
|
});
|
||||||
var styledGraticule = new Graticule({
|
var styledGraticule = new Graticule({
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ 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 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 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';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ describe('ol.render.canvas.Immediate', function() {
|
|||||||
sinon.spy(context, 'setImageStyle');
|
sinon.spy(context, 'setImageStyle');
|
||||||
sinon.spy(context, 'setTextStyle');
|
sinon.spy(context, 'setTextStyle');
|
||||||
var fill = new Fill({});
|
var fill = new Fill({});
|
||||||
var stroke = new _ol_style_Stroke_({});
|
var stroke = new 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_({});
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import _ol_render_webgl_CircleReplay_ from '../../../../../src/ol/render/webgl/C
|
|||||||
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 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 Stroke from '../../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
describe('ol.render.webgl.CircleReplay', function() {
|
describe('ol.render.webgl.CircleReplay', function() {
|
||||||
var replay;
|
var replay;
|
||||||
|
|
||||||
var strokeStyle = new _ol_style_Stroke_({
|
var strokeStyle = new Stroke({
|
||||||
color: [0, 255, 0, 0.4]
|
color: [0, 255, 0, 0.4]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/web
|
|||||||
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 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 Stroke from '../../../../../src/ol/style/Stroke.js';
|
||||||
import Style from '../../../../../src/ol/style/Style.js';
|
import Style from '../../../../../src/ol/style/Style.js';
|
||||||
|
|
||||||
describe('ol.render.webgl.Immediate', function() {
|
describe('ol.render.webgl.Immediate', function() {
|
||||||
@@ -24,7 +24,7 @@ describe('ol.render.webgl.Immediate', function() {
|
|||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_(),
|
image: new _ol_style_Circle_(),
|
||||||
fill: new Fill(),
|
fill: new Fill(),
|
||||||
stroke: new _ol_style_Stroke_()
|
stroke: new Stroke()
|
||||||
});
|
});
|
||||||
circle = new Circle([0, 0], 5);
|
circle = new Circle([0, 0], 5);
|
||||||
line = new LineString([[0, 0], [5, 5]]);
|
line = new LineString([[0, 0], [5, 5]]);
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ import MultiLineString from '../../../../../src/ol/geom/MultiLineString.js';
|
|||||||
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_linestringreplay_defaultshader_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader.js';
|
import _ol_render_webgl_linestringreplay_defaultshader_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader.js';
|
||||||
import _ol_render_webgl_linestringreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader/Locations.js';
|
import _ol_render_webgl_linestringreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader/Locations.js';
|
||||||
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
|
import Stroke from '../../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
describe('ol.render.webgl.LineStringReplay', function() {
|
describe('ol.render.webgl.LineStringReplay', function() {
|
||||||
var replay;
|
var replay;
|
||||||
|
|
||||||
var strokeStyle1 = new _ol_style_Stroke_({
|
var strokeStyle1 = new Stroke({
|
||||||
color: [0, 255, 0, 0.4]
|
color: [0, 255, 0, 0.4]
|
||||||
});
|
});
|
||||||
|
|
||||||
var strokeStyle2 = new _ol_style_Stroke_({
|
var strokeStyle2 = new Stroke({
|
||||||
color: [255, 0, 0, 1],
|
color: [255, 0, 0, 1],
|
||||||
lineCap: 'square',
|
lineCap: 'square',
|
||||||
lineJoin: 'miter'
|
lineJoin: 'miter'
|
||||||
@@ -100,7 +100,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
|
|||||||
it('triangulates linestrings', function() {
|
it('triangulates linestrings', function() {
|
||||||
var linestring;
|
var linestring;
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: [0, 255, 0, 1],
|
color: [0, 255, 0, 1],
|
||||||
lineCap: 'butt',
|
lineCap: 'butt',
|
||||||
lineJoin: 'bevel'
|
lineJoin: 'bevel'
|
||||||
@@ -121,7 +121,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
|
|||||||
it('optionally creates miters', function() {
|
it('optionally creates miters', function() {
|
||||||
var linestring;
|
var linestring;
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: [0, 255, 0, 1],
|
color: [0, 255, 0, 1],
|
||||||
lineCap: 'butt'
|
lineCap: 'butt'
|
||||||
});
|
});
|
||||||
@@ -141,7 +141,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
|
|||||||
it('optionally creates caps', function() {
|
it('optionally creates caps', function() {
|
||||||
var linestring;
|
var linestring;
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: [0, 255, 0, 1]
|
color: [0, 255, 0, 1]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
|
|||||||
it('respects segment orientation', function() {
|
it('respects segment orientation', function() {
|
||||||
var linestring;
|
var linestring;
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: [0, 255, 0, 1],
|
color: [0, 255, 0, 1],
|
||||||
lineCap: 'butt',
|
lineCap: 'butt',
|
||||||
lineJoin: 'bevel'
|
lineJoin: 'bevel'
|
||||||
@@ -183,7 +183,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
|
|||||||
it('closes boundaries', function() {
|
it('closes boundaries', function() {
|
||||||
var linestring;
|
var linestring;
|
||||||
|
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
color: [0, 255, 0, 1],
|
color: [0, 255, 0, 1],
|
||||||
lineCap: 'butt',
|
lineCap: 'butt',
|
||||||
lineJoin: 'bevel'
|
lineJoin: 'bevel'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../../../..
|
|||||||
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 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 Stroke from '../../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
describe('ol.render.webgl.PolygonReplay', function() {
|
describe('ol.render.webgl.PolygonReplay', function() {
|
||||||
var replay;
|
var replay;
|
||||||
@@ -16,7 +16,7 @@ describe('ol.render.webgl.PolygonReplay', function() {
|
|||||||
var fillStyle = new 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 Stroke({
|
||||||
color: [0, 255, 0, 0.4]
|
color: [0, 255, 0, 0.4]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ 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 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 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';
|
||||||
|
|
||||||
describe('ol.render.webgl.TextReplay', function() {
|
describe('ol.render.webgl.TextReplay', function() {
|
||||||
@@ -40,7 +40,7 @@ describe('ol.render.webgl.TextReplay', function() {
|
|||||||
new Fill({
|
new Fill({
|
||||||
color: [0, 0, 0, 1]
|
color: [0, 0, 0, 1]
|
||||||
}),
|
}),
|
||||||
new _ol_style_Stroke_({
|
new Stroke({
|
||||||
width: 1,
|
width: 1,
|
||||||
color: [0, 0, 0, 1],
|
color: [0, 0, 0, 1],
|
||||||
lineCap: 'butt',
|
lineCap: 'butt',
|
||||||
@@ -54,7 +54,7 @@ describe('ol.render.webgl.TextReplay', function() {
|
|||||||
new Fill({
|
new Fill({
|
||||||
color: [255, 255, 255, 1]
|
color: [255, 255, 255, 1]
|
||||||
}),
|
}),
|
||||||
new _ol_style_Stroke_({
|
new Stroke({
|
||||||
width: 1,
|
width: 1,
|
||||||
color: [255, 255, 255, 1]
|
color: [255, 255, 255, 1]
|
||||||
}),
|
}),
|
||||||
@@ -65,7 +65,7 @@ describe('ol.render.webgl.TextReplay', function() {
|
|||||||
new Fill({
|
new Fill({
|
||||||
color: [0, 0, 0, 1]
|
color: [0, 0, 0, 1]
|
||||||
}),
|
}),
|
||||||
new _ol_style_Stroke_({
|
new Stroke({
|
||||||
width: 1,
|
width: 1,
|
||||||
color: [0, 0, 0, 1]
|
color: [0, 0, 0, 1]
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import _ol_render_canvas_Replay_ from '../../../../../src/ol/render/canvas/Repla
|
|||||||
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 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 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';
|
||||||
|
|
||||||
@@ -45,11 +45,11 @@ describe('ol.render.canvas.ReplayGroup', function() {
|
|||||||
});
|
});
|
||||||
style1 = new Style({
|
style1 = new Style({
|
||||||
fill: new Fill({color: 'black'}),
|
fill: new Fill({color: 'black'}),
|
||||||
stroke: new _ol_style_Stroke_({color: 'white', width: 1})
|
stroke: new Stroke({color: 'white', width: 1})
|
||||||
});
|
});
|
||||||
style2 = new Style({
|
style2 = new Style({
|
||||||
fill: new Fill({color: 'white'}),
|
fill: new Fill({color: 'white'}),
|
||||||
stroke: new _ol_style_Stroke_({color: 'black', width: 1, lineDash: [3, 6],
|
stroke: new Stroke({color: 'black', width: 1, lineDash: [3, 6],
|
||||||
lineDashOffset: 2})
|
lineDashOffset: 2})
|
||||||
});
|
});
|
||||||
fillCount = 0;
|
fillCount = 0;
|
||||||
@@ -448,7 +448,7 @@ describe('ol.render.canvas.LineStringReplay', function() {
|
|||||||
var resolution = 10;
|
var resolution = 10;
|
||||||
var replay = new _ol_render_canvas_LineStringReplay_(tolerance, extent,
|
var replay = new _ol_render_canvas_LineStringReplay_(tolerance, extent,
|
||||||
resolution);
|
resolution);
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
width: 2
|
width: 2
|
||||||
});
|
});
|
||||||
replay.setFillStrokeStyle(null, stroke);
|
replay.setFillStrokeStyle(null, stroke);
|
||||||
@@ -476,7 +476,7 @@ describe('ol.render.canvas.PolygonReplay', function() {
|
|||||||
it('returns correct offset', function() {
|
it('returns correct offset', function() {
|
||||||
var coords = [1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2];
|
var coords = [1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2];
|
||||||
var ends = [7, 14];
|
var ends = [7, 14];
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
width: 5
|
width: 5
|
||||||
});
|
});
|
||||||
replay.setFillStrokeStyle(null, stroke);
|
replay.setFillStrokeStyle(null, stroke);
|
||||||
@@ -491,7 +491,7 @@ describe('ol.render.canvas.PolygonReplay', function() {
|
|||||||
describe('#getBufferedMaxExtent()', function() {
|
describe('#getBufferedMaxExtent()', function() {
|
||||||
|
|
||||||
it('buffers the max extent to accommodate stroke width', function() {
|
it('buffers the max extent to accommodate stroke width', function() {
|
||||||
var stroke = new _ol_style_Stroke_({
|
var stroke = new Stroke({
|
||||||
width: 5
|
width: 5
|
||||||
});
|
});
|
||||||
replay.setFillStrokeStyle(null, stroke);
|
replay.setFillStrokeStyle(null, stroke);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/Rep
|
|||||||
import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js';
|
import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js';
|
||||||
import 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
import Style from '../../../../src/ol/style/Style.js';
|
import Style from '../../../../src/ol/style/Style.js';
|
||||||
import Feature from '../../../../src/ol/Feature.js';
|
import Feature from '../../../../src/ol/Feature.js';
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ describe('ol.renderer.vector', function() {
|
|||||||
style = new Style({
|
style = new Style({
|
||||||
image: iconStyle,
|
image: iconStyle,
|
||||||
fill: new Fill({}),
|
fill: new Fill({}),
|
||||||
stroke: new _ol_style_Stroke_({})
|
stroke: new Stroke({})
|
||||||
});
|
});
|
||||||
squaredTolerance = 1;
|
squaredTolerance = 1;
|
||||||
listener = function() {};
|
listener = function() {};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.style.Circle', function() {
|
describe('ol.style.Circle', function() {
|
||||||
@@ -88,7 +88,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
radius: 5,
|
radius: 5,
|
||||||
@@ -110,7 +110,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -161,7 +161,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new _ol_style_Circle_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -174,7 +174,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -188,7 +188,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -206,7 +206,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -220,7 +220,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -238,7 +238,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -247,7 +247,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -263,7 +263,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -272,7 +272,7 @@ describe('ol.style.Circle', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
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 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
|
|
||||||
describe('ol.style.RegularShape', function() {
|
describe('ol.style.RegularShape', function() {
|
||||||
@@ -122,7 +122,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
radius2: 6,
|
radius2: 6,
|
||||||
angle: 1,
|
angle: 1,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
rotation: 2,
|
rotation: 2,
|
||||||
@@ -149,7 +149,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -210,7 +210,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
});
|
});
|
||||||
var style2 = new _ol_style_RegularShape_({
|
var style2 = new _ol_style_RegularShape_({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -226,7 +226,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -243,7 +243,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -264,7 +264,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -281,7 +281,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'round',
|
lineCap: 'round',
|
||||||
lineDash: [5, 15, 25],
|
lineDash: [5, 15, 25],
|
||||||
@@ -299,7 +299,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -308,7 +308,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -324,7 +324,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -333,7 +333,7 @@ describe('ol.style.RegularShape', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
|
import Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
describe('ol.style.Stroke', function() {
|
describe('ol.style.Stroke', function() {
|
||||||
|
|
||||||
describe('#clone', function() {
|
describe('#clone', function() {
|
||||||
|
|
||||||
it('creates a new ol.style.Stroke', function() {
|
it('creates a new ol.style.Stroke', function() {
|
||||||
var original = new _ol_style_Stroke_();
|
var original = new Stroke();
|
||||||
var clone = original.clone();
|
var clone = original.clone();
|
||||||
expect(clone).to.be.an(_ol_style_Stroke_);
|
expect(clone).to.be.an(Stroke);
|
||||||
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_Stroke_({
|
var original = new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
lineCap: 'square',
|
lineCap: 'square',
|
||||||
lineJoin: 'miter',
|
lineJoin: 'miter',
|
||||||
@@ -32,7 +32,7 @@ describe('ol.style.Stroke', 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_Stroke_({
|
var original = new Stroke({
|
||||||
color: [1, 2, 3, 0.4],
|
color: [1, 2, 3, 0.4],
|
||||||
lineDash: [1, 2, 3]
|
lineDash: [1, 2, 3]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ 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 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 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';
|
||||||
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ describe('ol.style.Style', function() {
|
|||||||
color: 'rgba(255, 255, 255, 0.6)'
|
color: 'rgba(255, 255, 255, 0.6)'
|
||||||
});
|
});
|
||||||
|
|
||||||
var testStroke = new _ol_style_Stroke_({
|
var testStroke = new Stroke({
|
||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
});
|
});
|
||||||
@@ -23,7 +23,7 @@ describe('ol.style.Style', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#000'
|
color: '#000'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
@@ -51,7 +51,7 @@ describe('ol.style.Style', function() {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 5
|
radius: 5
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
text: new _ol_style_Text_({
|
text: new _ol_style_Text_({
|
||||||
@@ -77,7 +77,7 @@ describe('ol.style.Style', function() {
|
|||||||
image: new _ol_style_Circle_({
|
image: new _ol_style_Circle_({
|
||||||
radius: 5
|
radius: 5
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
text: new _ol_style_Text_({
|
text: new _ol_style_Text_({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 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 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';
|
||||||
|
|
||||||
|
|
||||||
@@ -50,13 +50,13 @@ describe('ol.style.Text', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
backgroundFill: new Fill({
|
backgroundFill: new Fill({
|
||||||
color: 'white'
|
color: 'white'
|
||||||
}),
|
}),
|
||||||
backgroundStroke: new _ol_style_Stroke_({
|
backgroundStroke: new Stroke({
|
||||||
color: 'black'
|
color: 'black'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -81,7 +81,7 @@ describe('ol.style.Text', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
stroke: new _ol_style_Stroke_({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user