Rename _ol_style_Circle_ to CircleStyle
This commit is contained in:
@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
|
|||||||
import Point from '../src/ol/geom/Point.js';
|
import Point from '../src/ol/geom/Point.js';
|
||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -19,7 +19,7 @@ var redLayer = new VectorLayer({
|
|||||||
features: [new Feature(new Point([0, 0]))]
|
features: [new Feature(new Point([0, 0]))]
|
||||||
}),
|
}),
|
||||||
style: new Style({
|
style: new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,0,0,0.8)'
|
color: 'rgba(255,0,0,0.8)'
|
||||||
}),
|
}),
|
||||||
@@ -37,7 +37,7 @@ var greenLayer = new VectorLayer({
|
|||||||
features: [new Feature(new Point([250, 433.013]))]
|
features: [new Feature(new Point([250, 433.013]))]
|
||||||
}),
|
}),
|
||||||
style: new Style({
|
style: new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0,255,0,0.8)'
|
color: 'rgba(0,255,0,0.8)'
|
||||||
}),
|
}),
|
||||||
@@ -54,7 +54,7 @@ var blueLayer = new VectorLayer({
|
|||||||
features: [new Feature(new Point([500, 0]))]
|
features: [new Feature(new Point([500, 0]))]
|
||||||
}),
|
}),
|
||||||
style: new Style({
|
style: new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0,0,255,0.8)'
|
color: 'rgba(0,0,255,0.8)'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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 style = new Style({
|
|||||||
color: '#319FD3',
|
color: '#319FD3',
|
||||||
width: 1
|
width: 1
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255, 255, 255, 0.6)'
|
color: 'rgba(255, 255, 255, 0.6)'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
|||||||
import Cluster from '../src/ol/source/Cluster.js';
|
import Cluster from '../src/ol/source/Cluster.js';
|
||||||
import OSM from '../src/ol/source/OSM.js';
|
import OSM from '../src/ol/source/OSM.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -41,7 +41,7 @@ var clusters = new VectorLayer({
|
|||||||
var style = styleCache[size];
|
var style = styleCache[size];
|
||||||
if (!style) {
|
if (!style) {
|
||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
|||||||
import TileLayer from '../src/ol/layer/Tile.js';
|
import TileLayer from '../src/ol/layer/Tile.js';
|
||||||
import BingMaps from '../src/ol/source/BingMaps.js';
|
import BingMaps from '../src/ol/source/BingMaps.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -19,7 +19,7 @@ import Style from '../src/ol/style/Style.js';
|
|||||||
|
|
||||||
var defaultStyle = {
|
var defaultStyle = {
|
||||||
'Point': new Style({
|
'Point': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,255,0,0.5)'
|
color: 'rgba(255,255,0,0.5)'
|
||||||
}),
|
}),
|
||||||
@@ -46,7 +46,7 @@ var defaultStyle = {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiPoint': new Style({
|
'MultiPoint': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,0,255,0.5)'
|
color: 'rgba(255,0,255,0.5)'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import BingMaps from '../src/ol/source/BingMaps.js';
|
import BingMaps from '../src/ol/source/BingMaps.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -19,7 +19,7 @@ import Style from '../src/ol/style/Style.js';
|
|||||||
|
|
||||||
var defaultStyle = {
|
var defaultStyle = {
|
||||||
'Point': new Style({
|
'Point': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,255,0,0.5)'
|
color: 'rgba(255,255,0,0.5)'
|
||||||
}),
|
}),
|
||||||
@@ -46,7 +46,7 @@ var defaultStyle = {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'MultiPoint': new Style({
|
'MultiPoint': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,0,255,0.5)'
|
color: 'rgba(255,0,255,0.5)'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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 vector = new VectorLayer({
|
|||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#ffcc33'
|
color: '#ffcc33'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
|||||||
import Point from '../src/ol/geom/Point.js';
|
import Point from '../src/ol/geom/Point.js';
|
||||||
import TileLayer from '../src/ol/layer/Tile.js';
|
import TileLayer from '../src/ol/layer/Tile.js';
|
||||||
import OSM from '../src/ol/source/OSM.js';
|
import OSM from '../src/ol/source/OSM.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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,7 +24,7 @@ var map = new Map({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var imageStyle = new Style({
|
var imageStyle = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'yellow'}),
|
fill: new Fill({color: 'yellow'}),
|
||||||
@@ -33,7 +33,7 @@ var imageStyle = new Style({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var headInnerImageStyle = new Style({
|
var headInnerImageStyle = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 2,
|
radius: 2,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'blue'})
|
fill: new Fill({color: 'blue'})
|
||||||
@@ -41,7 +41,7 @@ var headInnerImageStyle = new Style({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var headOuterImageStyle = new Style({
|
var headOuterImageStyle = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'black'})
|
fill: new Fill({color: 'black'})
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
|||||||
import Cluster from '../src/ol/source/Cluster.js';
|
import Cluster from '../src/ol/source/Cluster.js';
|
||||||
import Stamen from '../src/ol/source/Stamen.js';
|
import Stamen from '../src/ol/source/Stamen.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import RegularShape from '../src/ol/style/RegularShape.js';
|
import RegularShape from '../src/ol/style/RegularShape.js';
|
||||||
import Stroke from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
@@ -86,7 +86,7 @@ function styleFunction(feature, resolution) {
|
|||||||
var size = feature.get('features').length;
|
var size = feature.get('features').length;
|
||||||
if (size > 1) {
|
if (size > 1) {
|
||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: feature.get('radius'),
|
radius: feature.get('radius'),
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))]
|
color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))]
|
||||||
@@ -107,7 +107,7 @@ function styleFunction(feature, resolution) {
|
|||||||
|
|
||||||
function selectStyleFunction(feature) {
|
function selectStyleFunction(feature) {
|
||||||
var styles = [new Style({
|
var styles = [new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: feature.get('radius'),
|
radius: feature.get('radius'),
|
||||||
fill: invisibleFill
|
fill: invisibleFill
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import 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';
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ function flash(feature) {
|
|||||||
var opacity = easeOut(1 - elapsedRatio);
|
var opacity = easeOut(1 - elapsedRatio);
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: radius,
|
radius: radius,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
|
|||||||
@@ -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_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import Icon from '../src/ol/style/Icon.js';
|
import Icon from '../src/ol/style/Icon.js';
|
||||||
import Stroke from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
@@ -97,7 +97,7 @@ var styles = {
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
'geoMarker': new Style({
|
'geoMarker': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'black'}),
|
fill: new Fill({color: 'black'}),
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ 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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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 CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new Stroke({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
@@ -66,7 +66,7 @@ var styles = {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'magenta'
|
color: 'magenta'
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
|
|||||||
@@ -8,7 +8,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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -68,7 +68,7 @@ geolocation.on('change:accuracyGeometry', function() {
|
|||||||
|
|
||||||
var positionFeature = new Feature();
|
var positionFeature = new Feature();
|
||||||
positionFeature.setStyle(new Style({
|
positionFeature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 6,
|
radius: 6,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#3399CC'
|
color: '#3399CC'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import BingMaps from '../src/ol/source/BingMaps.js';
|
import BingMaps from '../src/ol/source/BingMaps.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -19,7 +19,7 @@ var raster = new TileLayer({
|
|||||||
|
|
||||||
var style = {
|
var style = {
|
||||||
'Point': new Style({
|
'Point': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,255,0,0.4)'
|
color: 'rgba(255,255,0,0.4)'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -9,7 +9,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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -158,7 +158,7 @@ var stroke = new Stroke({
|
|||||||
});
|
});
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: stroke
|
stroke: stroke
|
||||||
@@ -179,7 +179,7 @@ var featureOverlay = new VectorLayer({
|
|||||||
source: new VectorSource(),
|
source: new VectorSource(),
|
||||||
map: map,
|
map: map,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255,0,0,0.9)'
|
color: 'rgba(255,0,0,0.9)'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import Stamen from '../src/ol/source/Stamen.js';
|
import Stamen from '../src/ol/source/Stamen.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -22,7 +22,7 @@ var styleFunction = function(feature) {
|
|||||||
var style = styleCache[radius];
|
var style = styleCache[radius];
|
||||||
if (!style) {
|
if (!style) {
|
||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: radius,
|
radius: radius,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(255, 153, 0, 0.4)'
|
color: 'rgba(255, 153, 0, 0.4)'
|
||||||
|
|||||||
@@ -10,7 +10,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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -32,7 +32,7 @@ var vector = new VectorLayer({
|
|||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#ffcc33'
|
color: '#ffcc33'
|
||||||
@@ -189,7 +189,7 @@ function addInteraction() {
|
|||||||
lineDash: [10, 10],
|
lineDash: [10, 10],
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'rgba(0, 0, 0, 0.7)'
|
color: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Modify from '../src/ol/interaction/Modify.js';
|
|||||||
import Select from '../src/ol/interaction/Select.js';
|
import Select from '../src/ol/interaction/Select.js';
|
||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -14,7 +14,7 @@ import Style from '../src/ol/style/Style.js';
|
|||||||
|
|
||||||
var styleFunction = (function() {
|
var styleFunction = (function() {
|
||||||
var styles = {};
|
var styles = {};
|
||||||
var image = new _ol_style_Circle_({
|
var image = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: null,
|
fill: null,
|
||||||
stroke: new Stroke({color: 'orange', width: 2})
|
stroke: new Stroke({color: 'orange', width: 2})
|
||||||
@@ -194,7 +194,7 @@ var overlayStyle = (function() {
|
|||||||
|
|
||||||
styles['Point'] = [
|
styles['Point'] = [
|
||||||
new Style({
|
new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: [0, 153, 255, 1]
|
color: [0, 153, 255, 1]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
|||||||
import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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 styles = [
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
new Style({
|
new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'orange'
|
color: 'orange'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import LineString from '../src/ol/geom/LineString.js';
|
|||||||
import Point from '../src/ol/geom/Point.js';
|
import Point from '../src/ol/geom/Point.js';
|
||||||
import Polygon from '../src/ol/geom/Polygon.js';
|
import Polygon from '../src/ol/geom/Polygon.js';
|
||||||
import _ol_render_ from '../src/ol/render.js';
|
import _ol_render_ from '../src/ol/render.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -16,7 +16,7 @@ var stroke = new Stroke({color: 'black'});
|
|||||||
var style = new Style({
|
var style = new Style({
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: stroke
|
stroke: stroke
|
||||||
|
|||||||
@@ -8,7 +8,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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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 vector = new VectorLayer({
|
|||||||
color: '#ffcc33',
|
color: '#ffcc33',
|
||||||
width: 2
|
width: 2
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#ffcc33'
|
color: '#ffcc33'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import RegularShape from '../src/ol/style/RegularShape.js';
|
import RegularShape from '../src/ol/style/RegularShape.js';
|
||||||
import Stroke from '../src/ol/style/Stroke.js';
|
import Stroke from '../src/ol/style/Stroke.js';
|
||||||
@@ -47,7 +47,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
|
|||||||
var info = symbolInfo[i];
|
var info = symbolInfo[i];
|
||||||
for (j = 0; j < radiuses.length; ++j) {
|
for (j = 0; j < radiuses.length; ++j) {
|
||||||
// circle symbol
|
// circle symbol
|
||||||
symbols.push(new _ol_style_Circle_({
|
symbols.push(new CircleStyle({
|
||||||
opacity: info.opacity,
|
opacity: info.opacity,
|
||||||
scale: info.scale,
|
scale: info.scale,
|
||||||
radius: radiuses[j],
|
radius: radiuses[j],
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import LineString from '../src/ol/geom/LineString.js';
|
|||||||
import Point from '../src/ol/geom/Point.js';
|
import Point from '../src/ol/geom/Point.js';
|
||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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,14 +25,14 @@ for (var i = 0; i < count; ++i) {
|
|||||||
|
|
||||||
var styles = {
|
var styles = {
|
||||||
'10': new Style({
|
'10': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({color: '#666666'}),
|
fill: new Fill({color: '#666666'}),
|
||||||
stroke: new 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 CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: new Fill({color: '#666666'}),
|
fill: new Fill({color: '#666666'}),
|
||||||
stroke: new Stroke({color: '#bada55', width: 1})
|
stroke: new Stroke({color: '#bada55', width: 1})
|
||||||
@@ -102,7 +102,7 @@ var stroke = new Stroke({
|
|||||||
});
|
});
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
stroke: stroke
|
stroke: stroke
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ 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 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Text from '../src/ol/style/Text.js';
|
import Text from '../src/ol/style/Text.js';
|
||||||
import MousePosition from '../src/ol/control/MousePosition.js';
|
import MousePosition from '../src/ol/control/MousePosition.js';
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ var nodesLayer = new VectorLayer({
|
|||||||
source: nodes,
|
source: nodes,
|
||||||
style: function(f) {
|
style: function(f) {
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
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 Stroke({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
|||||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||||
import 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 CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -172,7 +172,7 @@ var vectorLines = new VectorLayer({
|
|||||||
// Points
|
// Points
|
||||||
function pointStyleFunction(feature, resolution) {
|
function pointStyleFunction(feature, resolution) {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
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 Stroke({color: 'red', width: 1})
|
stroke: new Stroke({color: 'red', width: 1})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
|||||||
import {transformExtent} from '../src/ol/proj.js';
|
import {transformExtent} from '../src/ol/proj.js';
|
||||||
import BingMaps from '../src/ol/source/BingMaps.js';
|
import BingMaps from '../src/ol/source/BingMaps.js';
|
||||||
import VectorSource from '../src/ol/source/Vector.js';
|
import VectorSource from '../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
import CircleStyle from '../src/ol/style/Circle.js';
|
||||||
import Fill from '../src/ol/style/Fill.js';
|
import Fill from '../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -66,7 +66,7 @@ var styles = {
|
|||||||
},
|
},
|
||||||
'natural': {
|
'natural': {
|
||||||
'tree': new Style({
|
'tree': new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 2,
|
radius: 2,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(140, 208, 95, 1.0)'
|
color: 'rgba(140, 208, 95, 1.0)'
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import RegularShape from '../style/RegularShape.js';
|
|||||||
* @extends {ol.style.RegularShape}
|
* @extends {ol.style.RegularShape}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_style_Circle_ = function(opt_options) {
|
var CircleStyle = function(opt_options) {
|
||||||
|
|
||||||
var options = opt_options || {};
|
var options = opt_options || {};
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ var _ol_style_Circle_ = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_style_Circle_, RegularShape);
|
inherits(CircleStyle, RegularShape);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,8 +37,8 @@ inherits(_ol_style_Circle_, RegularShape);
|
|||||||
* @override
|
* @override
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Circle_.prototype.clone = function() {
|
CircleStyle.prototype.clone = function() {
|
||||||
var style = new _ol_style_Circle_({
|
var style = new CircleStyle({
|
||||||
fill: this.getFill() ? this.getFill().clone() : undefined,
|
fill: this.getFill() ? this.getFill().clone() : undefined,
|
||||||
stroke: this.getStroke() ? this.getStroke().clone() : undefined,
|
stroke: this.getStroke() ? this.getStroke().clone() : undefined,
|
||||||
radius: this.getRadius(),
|
radius: this.getRadius(),
|
||||||
@@ -57,8 +57,8 @@ _ol_style_Circle_.prototype.clone = function() {
|
|||||||
* @param {number} radius Circle radius.
|
* @param {number} radius Circle radius.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_style_Circle_.prototype.setRadius = function(radius) {
|
CircleStyle.prototype.setRadius = function(radius) {
|
||||||
this.radius_ = radius;
|
this.radius_ = radius;
|
||||||
this.render_(this.atlasManager_);
|
this.render_(this.atlasManager_);
|
||||||
};
|
};
|
||||||
export default _ol_style_Circle_;
|
export default CircleStyle;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {assert} from '../asserts.js';
|
import {assert} from '../asserts.js';
|
||||||
import GeometryType from '../geom/GeometryType.js';
|
import GeometryType from '../geom/GeometryType.js';
|
||||||
import _ol_style_Circle_ from '../style/Circle.js';
|
import CircleStyle from '../style/Circle.js';
|
||||||
import Fill from '../style/Fill.js';
|
import Fill from '../style/Fill.js';
|
||||||
import Stroke from '../style/Stroke.js';
|
import Stroke from '../style/Stroke.js';
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ Style.defaultFunction = function(feature, resolution) {
|
|||||||
});
|
});
|
||||||
Style.default_ = [
|
Style.default_ = [
|
||||||
new Style({
|
new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
radius: 5
|
radius: 5
|
||||||
@@ -390,7 +390,7 @@ Style.createDefaultEditing = function() {
|
|||||||
|
|
||||||
styles[GeometryType.POINT] = [
|
styles[GeometryType.POINT] = [
|
||||||
new Style({
|
new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: width * 2,
|
radius: width * 2,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: blue
|
color: blue
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import _ol_obj_ from '../../../../src/ol/obj.js';
|
|||||||
import {transform} from '../../../../src/ol/proj.js';
|
import {transform} from '../../../../src/ol/proj.js';
|
||||||
import TileImage from '../../../../src/ol/source/TileImage.js';
|
import TileImage from '../../../../src/ol/source/TileImage.js';
|
||||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -278,7 +278,7 @@ describe('ol.rendering.layer.Tile', function() {
|
|||||||
});
|
});
|
||||||
onAddLayer = function(evt) {
|
onAddLayer = function(evt) {
|
||||||
evt.element.on('render', function(e) {
|
evt.element.on('render', function(e) {
|
||||||
e.vectorContext.setImageStyle(new _ol_style_Circle_({
|
e.vectorContext.setImageStyle(new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
snapToPixel: false,
|
snapToPixel: false,
|
||||||
fill: new Fill({color: 'yellow'}),
|
fill: new Fill({color: 'yellow'}),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Point from '../../../../src/ol/geom/Point.js';
|
|||||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -724,7 +724,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
layer.setDeclutter(true);
|
layer.setDeclutter(true);
|
||||||
layer.setStyle(function(feature) {
|
layer.setStyle(function(feature) {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -764,7 +764,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
layer.setDeclutter(true);
|
layer.setDeclutter(true);
|
||||||
layer.setStyle(function(feature) {
|
layer.setStyle(function(feature) {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -806,7 +806,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
layer.setStyle(function(feature) {
|
layer.setStyle(function(feature) {
|
||||||
return new Style({
|
return new Style({
|
||||||
zIndex: feature.get('zIndex'),
|
zIndex: feature.get('zIndex'),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 15,
|
radius: 15,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -844,7 +844,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
layer.setDeclutter(true);
|
layer.setDeclutter(true);
|
||||||
layer.setStyle(function(feature) {
|
layer.setStyle(function(feature) {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -874,7 +874,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
|
|
||||||
var point = new Feature(new Point(center));
|
var point = new Feature(new Point(center));
|
||||||
point.setStyle(new Style({
|
point.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -917,7 +917,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
|
|
||||||
var point = new Feature(new Point(center));
|
var point = new Feature(new Point(center));
|
||||||
point.setStyle(new Style({
|
point.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
@@ -961,7 +961,7 @@ describe('ol.rendering.layer.Vector', function() {
|
|||||||
var point = new Feature(new Point(center));
|
var point = new Feature(new Point(center));
|
||||||
point.setStyle(new Style({
|
point.setStyle(new Style({
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 8,
|
radius: 8,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import VectorTileLayer from '../../../../src/ol/layer/VectorTile.js';
|
|||||||
import _ol_obj_ from '../../../../src/ol/obj.js';
|
import _ol_obj_ from '../../../../src/ol/obj.js';
|
||||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||||
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
||||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import CircleStyle 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 Text from '../../../../src/ol/style/Text.js';
|
import Text from '../../../../src/ol/style/Text.js';
|
||||||
@@ -105,7 +105,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
|||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
style: new Style({
|
style: new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'red'
|
color: 'red'
|
||||||
@@ -144,7 +144,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
|||||||
var geom = feature.getGeometry();
|
var geom = feature.getGeometry();
|
||||||
if (geom.getType() == 'Point') {
|
if (geom.getType() == 'Point') {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 7,
|
radius: 7,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'red'
|
color: 'red'
|
||||||
|
|||||||
@@ -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 VectorContext from '../../../src/ol/render/VectorContext.js';
|
import VectorContext from '../../../src/ol/render/VectorContext.js';
|
||||||
import CanvasImmediateRenderer from '../../../src/ol/render/canvas/Immediate.js';
|
import CanvasImmediateRenderer from '../../../src/ol/render/canvas/Immediate.js';
|
||||||
import _ol_style_Circle_ from '../../../src/ol/style/Circle.js';
|
import CircleStyle from '../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../src/ol/style/Fill.js';
|
import Fill from '../../../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -34,7 +34,7 @@ describe('ol.render', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'green'
|
color: 'green'
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import Map from '../../../../src/ol/Map.js';
|
|||||||
import View from '../../../../src/ol/View.js';
|
import View from '../../../../src/ol/View.js';
|
||||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import CircleStyle 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 Stroke from '../../../../src/ol/style/Stroke.js';
|
import Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
@@ -49,7 +49,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-20, 18]]) : new Point([-20, 18])
|
geometry: multi ? new MultiPoint([[-20, 18]]) : new Point([-20, 18])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 2,
|
radius: 2,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#91E339'
|
color: '#91E339'
|
||||||
@@ -62,7 +62,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-10, 18]]) : new Point([-10, 18])
|
geometry: multi ? new MultiPoint([[-10, 18]]) : new Point([-10, 18])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 4,
|
radius: 4,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#5447E6'
|
color: '#5447E6'
|
||||||
@@ -75,7 +75,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[4, 18]]) : new Point([4, 18])
|
geometry: multi ? new MultiPoint([[4, 18]]) : new Point([4, 18])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 6,
|
radius: 6,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#92A8A6'
|
color: '#92A8A6'
|
||||||
@@ -88,7 +88,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-20, 3]]) : new Point([-20, 3])
|
geometry: multi ? new MultiPoint([[-20, 3]]) : new Point([-20, 3])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 2,
|
radius: 2,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#91E339'
|
color: '#91E339'
|
||||||
@@ -105,7 +105,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-10, 3]]) : new Point([-10, 3])
|
geometry: multi ? new MultiPoint([[-10, 3]]) : new Point([-10, 3])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 4,
|
radius: 4,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#5447E6'
|
color: '#5447E6'
|
||||||
@@ -122,7 +122,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[4, 3]]) : new Point([4, 3])
|
geometry: multi ? new MultiPoint([[4, 3]]) : new Point([4, 3])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 6,
|
radius: 6,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#92A8A6'
|
color: '#92A8A6'
|
||||||
@@ -139,7 +139,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-20, -15]]) : new Point([-20, -15])
|
geometry: multi ? new MultiPoint([[-20, -15]]) : new Point([-20, -15])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 2,
|
radius: 2,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: '#256308',
|
color: '#256308',
|
||||||
@@ -153,7 +153,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[-10, -15]]) : new Point([-10, -15])
|
geometry: multi ? new MultiPoint([[-10, -15]]) : new Point([-10, -15])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 4,
|
radius: 4,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0, 0, 255, 0.3)'
|
color: 'rgba(0, 0, 255, 0.3)'
|
||||||
@@ -170,7 +170,7 @@ describe('ol.rendering.style.Circle', function() {
|
|||||||
geometry: multi ? new MultiPoint([[4, -15]]) : new Point([4, -15])
|
geometry: multi ? new MultiPoint([[4, -15]]) : new Point([4, -15])
|
||||||
});
|
});
|
||||||
feature.setStyle(new Style({
|
feature.setStyle(new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 6,
|
radius: 6,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(235, 45, 70, 0.6)'
|
color: 'rgba(235, 45, 70, 0.6)'
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
|
|||||||
import {addProjection, addCoordinateTransforms, transform, get as getProjection} from '../../../../src/ol/proj.js';
|
import {addProjection, addCoordinateTransforms, transform, get as getProjection} from '../../../../src/ol/proj.js';
|
||||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||||
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
|
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
|
||||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
import CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../src/ol/style/Fill.js';
|
||||||
import Icon from '../../../../src/ol/style/Icon.js';
|
import Icon from '../../../../src/ol/style/Icon.js';
|
||||||
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
|
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
|
||||||
@@ -2335,7 +2335,7 @@ describe('ol.format.KML', function() {
|
|||||||
|
|
||||||
it('skips image styles that are not icon styles', function() {
|
it('skips image styles that are not icon styles', function() {
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 4,
|
radius: 4,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgb(12, 34, 223)'
|
color: 'rgb(12, 34, 223)'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Point from '../../../../../src/ol/geom/Point.js';
|
|||||||
import Polygon from '../../../../../src/ol/geom/Polygon.js';
|
import Polygon from '../../../../../src/ol/geom/Polygon.js';
|
||||||
import VectorContext from '../../../../../src/ol/render/VectorContext.js';
|
import VectorContext from '../../../../../src/ol/render/VectorContext.js';
|
||||||
import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js';
|
import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js';
|
||||||
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
|
import CircleStyle from '../../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -45,7 +45,7 @@ describe('ol.render.canvas.Immediate', function() {
|
|||||||
var fill = new Fill({});
|
var fill = new Fill({});
|
||||||
var stroke = new Stroke({});
|
var stroke = new Stroke({});
|
||||||
var text = new Text({});
|
var text = new Text({});
|
||||||
var image = new _ol_style_Circle_({});
|
var image = new CircleStyle({});
|
||||||
var style = new Style({
|
var style = new Style({
|
||||||
fill: fill,
|
fill: fill,
|
||||||
stroke: stroke,
|
stroke: stroke,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import _ol_render_webgl_ImageReplay_ from '../../../../../src/ol/render/webgl/Im
|
|||||||
import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Immediate.js';
|
import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Immediate.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_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 CircleStyle from '../../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../../src/ol/style/Fill.js';
|
||||||
import 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';
|
||||||
@@ -22,7 +22,7 @@ describe('ol.render.webgl.Immediate', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1);
|
context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1);
|
||||||
style = new Style({
|
style = new Style({
|
||||||
image: new _ol_style_Circle_(),
|
image: new CircleStyle(),
|
||||||
fill: new Fill(),
|
fill: new Fill(),
|
||||||
stroke: new Stroke()
|
stroke: new Stroke()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
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 CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||||
import Fill from '../../../../src/ol/style/Fill.js';
|
import Fill from '../../../../src/ol/style/Fill.js';
|
||||||
import Stroke from '../../../../src/ol/style/Stroke.js';
|
import Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ describe('ol.style.Circle', function() {
|
|||||||
describe('#constructor', function() {
|
describe('#constructor', function() {
|
||||||
|
|
||||||
it('creates a canvas if no atlas is used (no fill-style)', function() {
|
it('creates a canvas if no atlas is used (no fill-style)', function() {
|
||||||
var style = new _ol_style_Circle_({radius: 10});
|
var style = new CircleStyle({radius: 10});
|
||||||
expect(style.getImage()).to.be.an(HTMLCanvasElement);
|
expect(style.getImage()).to.be.an(HTMLCanvasElement);
|
||||||
expect(style.getSize()).to.eql([21, 21]);
|
expect(style.getSize()).to.eql([21, 21]);
|
||||||
expect(style.getImageSize()).to.eql([21, 21]);
|
expect(style.getImageSize()).to.eql([21, 21]);
|
||||||
@@ -22,7 +22,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('creates a canvas if no atlas is used (fill-style)', function() {
|
it('creates a canvas if no atlas is used (fill-style)', function() {
|
||||||
var style = new _ol_style_Circle_({
|
var style = new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#FFFF00'
|
color: '#FFFF00'
|
||||||
@@ -41,7 +41,7 @@ describe('ol.style.Circle', function() {
|
|||||||
|
|
||||||
it('adds itself to an atlas manager (no fill-style)', function() {
|
it('adds itself to an atlas manager (no fill-style)', function() {
|
||||||
var atlasManager = new AtlasManager({initialSize: 512});
|
var atlasManager = new AtlasManager({initialSize: 512});
|
||||||
var style = new _ol_style_Circle_({radius: 10, atlasManager: atlasManager});
|
var style = new CircleStyle({radius: 10, atlasManager: atlasManager});
|
||||||
expect(style.getImage()).to.be.an(HTMLCanvasElement);
|
expect(style.getImage()).to.be.an(HTMLCanvasElement);
|
||||||
expect(style.getSize()).to.eql([21, 21]);
|
expect(style.getSize()).to.eql([21, 21]);
|
||||||
expect(style.getImageSize()).to.eql([512, 512]);
|
expect(style.getImageSize()).to.eql([512, 512]);
|
||||||
@@ -55,7 +55,7 @@ describe('ol.style.Circle', function() {
|
|||||||
|
|
||||||
it('adds itself to an atlas manager (fill-style)', function() {
|
it('adds itself to an atlas manager (fill-style)', function() {
|
||||||
var atlasManager = new AtlasManager({initialSize: 512});
|
var atlasManager = new AtlasManager({initialSize: 512});
|
||||||
var style = new _ol_style_Circle_({
|
var style = new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
atlasManager: atlasManager,
|
atlasManager: atlasManager,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
@@ -77,14 +77,14 @@ describe('ol.style.Circle', function() {
|
|||||||
describe('#clone', function() {
|
describe('#clone', function() {
|
||||||
|
|
||||||
it('creates a new ol.style.Circle', function() {
|
it('creates a new ol.style.Circle', function() {
|
||||||
var original = new _ol_style_Circle_();
|
var original = new CircleStyle();
|
||||||
var clone = original.clone();
|
var clone = original.clone();
|
||||||
expect(clone).to.be.an(_ol_style_Circle_);
|
expect(clone).to.be.an(CircleStyle);
|
||||||
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_Circle_({
|
var original = new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
@@ -106,7 +106,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('the clone does not reference the same objects as the original', function() {
|
it('the clone does not reference the same objects as the original', function() {
|
||||||
var original = new _ol_style_Circle_({
|
var original = new CircleStyle({
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
@@ -129,37 +129,37 @@ describe('ol.style.Circle', function() {
|
|||||||
describe('#getChecksum', function() {
|
describe('#getChecksum', function() {
|
||||||
|
|
||||||
it('calculates the same hash code for default options', function() {
|
it('calculates the same hash code for default options', function() {
|
||||||
var style1 = new _ol_style_Circle_();
|
var style1 = new CircleStyle();
|
||||||
var style2 = new _ol_style_Circle_();
|
var style2 = new CircleStyle();
|
||||||
expect(style1.getChecksum()).to.eql(style2.getChecksum());
|
expect(style1.getChecksum()).to.eql(style2.getChecksum());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calculates not the same hash code (radius)', function() {
|
it('calculates not the same hash code (radius)', function() {
|
||||||
var style1 = new _ol_style_Circle_();
|
var style1 = new CircleStyle();
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
});
|
});
|
||||||
expect(style1.getChecksum()).to.not.eql(style2.getChecksum());
|
expect(style1.getChecksum()).to.not.eql(style2.getChecksum());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calculates the same hash code (radius)', function() {
|
it('calculates the same hash code (radius)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
});
|
});
|
||||||
expect(style1.getChecksum()).to.eql(style2.getChecksum());
|
expect(style1.getChecksum()).to.eql(style2.getChecksum());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calculates not the same hash code (color)', function() {
|
it('calculates not the same hash code (color)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -169,7 +169,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('calculates the same hash code (everything set)', function() {
|
it('calculates the same hash code (everything set)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -183,7 +183,7 @@ describe('ol.style.Circle', function() {
|
|||||||
width: 2
|
width: 2
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -201,7 +201,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('calculates not the same hash code (stroke width differs)', function() {
|
it('calculates not the same hash code (stroke width differs)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -215,7 +215,7 @@ describe('ol.style.Circle', function() {
|
|||||||
width: 3
|
width: 3
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -233,7 +233,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('invalidates a cached checksum if values change (fill)', function() {
|
it('invalidates a cached checksum if values change (fill)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -242,7 +242,7 @@ describe('ol.style.Circle', function() {
|
|||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -258,7 +258,7 @@ describe('ol.style.Circle', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('invalidates a cached checksum if values change (stroke)', function() {
|
it('invalidates a cached checksum if values change (stroke)', function() {
|
||||||
var style1 = new _ol_style_Circle_({
|
var style1 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -267,7 +267,7 @@ describe('ol.style.Circle', function() {
|
|||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
var style2 = new _ol_style_Circle_({
|
var style2 = new CircleStyle({
|
||||||
radius: 5,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
@@ -286,7 +286,7 @@ describe('ol.style.Circle', function() {
|
|||||||
|
|
||||||
describe('#setRadius', function() {
|
describe('#setRadius', function() {
|
||||||
it('changes the circle radius', function() {
|
it('changes the circle radius', function() {
|
||||||
var style = new _ol_style_Circle_({
|
var style = new CircleStyle({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#FFFF00'
|
color: '#FFFF00'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js';
|
|||||||
import Point from '../../../../src/ol/geom/Point.js';
|
import Point from '../../../../src/ol/geom/Point.js';
|
||||||
import Style from '../../../../src/ol/style/Style.js';
|
import Style from '../../../../src/ol/style/Style.js';
|
||||||
import 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 CircleStyle from '../../../../src/ol/style/Circle.js';
|
||||||
import Stroke from '../../../../src/ol/style/Stroke.js';
|
import Stroke from '../../../../src/ol/style/Stroke.js';
|
||||||
import Text from '../../../../src/ol/style/Text.js';
|
import Text from '../../../../src/ol/style/Text.js';
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ describe('ol.style.Style', function() {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var testImage = new _ol_style_Circle_({
|
var testImage = new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ describe('ol.style.Style', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
}),
|
}),
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
@@ -74,7 +74,7 @@ describe('ol.style.Style', function() {
|
|||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: '#319FD3'
|
color: '#319FD3'
|
||||||
}),
|
}),
|
||||||
image: new _ol_style_Circle_({
|
image: new CircleStyle({
|
||||||
radius: 5
|
radius: 5
|
||||||
}),
|
}),
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
|
|||||||
Reference in New Issue
Block a user