diff --git a/examples/blend-modes.js b/examples/blend-modes.js index 819f4c4798..3541d6fc90 100644 --- a/examples/blend-modes.js +++ b/examples/blend-modes.js @@ -7,7 +7,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; // Create separate layers for red, green an blue circles. @@ -18,7 +18,7 @@ var redLayer = new VectorLayer({ source: new VectorSource({ features: [new Feature(new Point([0, 0]))] }), - style: new _ol_style_Style_({ + style: new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,0,0,0.8)' @@ -36,7 +36,7 @@ var greenLayer = new VectorLayer({ // 433.013 is roughly 250 * Math.sqrt(3) features: [new Feature(new Point([250, 433.013]))] }), - style: new _ol_style_Style_({ + style: new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(0,255,0,0.8)' @@ -53,7 +53,7 @@ var blueLayer = new VectorLayer({ source: new VectorSource({ features: [new Feature(new Point([500, 0]))] }), - style: new _ol_style_Style_({ + style: new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(0,0,255,0.8)' diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index f4810a1430..ceb4573098 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -8,7 +8,7 @@ import {fromLonLat} from '../src/ol/proj.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); @@ -58,7 +58,7 @@ var pattern = (function() { // Generate style for gradient or pattern fill var fill = new _ol_style_Fill_(); -var style = new _ol_style_Style_({ +var style = new Style({ fill: fill, stroke: new _ol_style_Stroke_({ color: '#333', diff --git a/examples/center.js b/examples/center.js index df01af6871..8ffa8e0a13 100644 --- a/examples/center.js +++ b/examples/center.js @@ -9,13 +9,13 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var source = new VectorSource({ url: 'data/geojson/switzerland.geojson', format: new GeoJSON() }); -var style = new _ol_style_Style_({ +var style = new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.6)' }), diff --git a/examples/cluster.js b/examples/cluster.js index 984abc59db..aceafc6e80 100644 --- a/examples/cluster.js +++ b/examples/cluster.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; @@ -40,7 +40,7 @@ var clusters = new VectorLayer({ var size = feature.get('features').length; var style = styleCache[size]; if (!style) { - style = new _ol_style_Style_({ + style = new Style({ image: new _ol_style_Circle_({ radius: 10, stroke: new _ol_style_Stroke_({ diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index 5b42560c59..11d5901ad8 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -14,7 +14,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; /** @@ -156,7 +156,7 @@ var map = new Map({ source: new VectorSource({ features: [pointFeature, lineFeature, polygonFeature] }), - style: new _ol_style_Style_({ + style: new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ anchor: [0.5, 46], anchorXUnits: 'fraction', diff --git a/examples/drag-and-drop-image-vector.js b/examples/drag-and-drop-image-vector.js index 7f69b9213d..ba7ea9f0ee 100644 --- a/examples/drag-and-drop-image-vector.js +++ b/examples/drag-and-drop-image-vector.js @@ -14,11 +14,11 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var defaultStyle = { - 'Point': new _ol_style_Style_({ + 'Point': new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,255,0,0.5)' @@ -30,13 +30,13 @@ var defaultStyle = { }) }) }), - 'LineString': new _ol_style_Style_({ + 'LineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#f00', width: 3 }) }), - 'Polygon': new _ol_style_Style_({ + 'Polygon': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(0,255,255,0.5)' }), @@ -45,7 +45,7 @@ var defaultStyle = { width: 1 }) }), - 'MultiPoint': new _ol_style_Style_({ + 'MultiPoint': new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,0,255,0.5)' @@ -57,13 +57,13 @@ var defaultStyle = { }) }) }), - 'MultiLineString': new _ol_style_Style_({ + 'MultiLineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#0f0', width: 3 }) }), - 'MultiPolygon': new _ol_style_Style_({ + 'MultiPolygon': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(0,0,255,0.5)' }), diff --git a/examples/drag-and-drop.js b/examples/drag-and-drop.js index fd61bd55f0..917200124f 100644 --- a/examples/drag-and-drop.js +++ b/examples/drag-and-drop.js @@ -14,11 +14,11 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var defaultStyle = { - 'Point': new _ol_style_Style_({ + 'Point': new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,255,0,0.5)' @@ -30,13 +30,13 @@ var defaultStyle = { }) }) }), - 'LineString': new _ol_style_Style_({ + 'LineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#f00', width: 3 }) }), - 'Polygon': new _ol_style_Style_({ + 'Polygon': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(0,255,255,0.5)' }), @@ -45,7 +45,7 @@ var defaultStyle = { width: 1 }) }), - 'MultiPoint': new _ol_style_Style_({ + 'MultiPoint': new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,0,255,0.5)' @@ -57,13 +57,13 @@ var defaultStyle = { }) }) }), - 'MultiLineString': new _ol_style_Style_({ + 'MultiLineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#0f0', width: 3 }) }), - 'MultiPolygon': new _ol_style_Style_({ + 'MultiPolygon': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(0,0,255,0.5)' }), diff --git a/examples/draw-and-modify-features.js b/examples/draw-and-modify-features.js index c3d5931f3d..a2f7b967a9 100644 --- a/examples/draw-and-modify-features.js +++ b/examples/draw-and-modify-features.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ source: new OSM() @@ -19,7 +19,7 @@ var raster = new TileLayer({ var source = new VectorSource(); var vector = new VectorLayer({ source: source, - style: new _ol_style_Style_({ + style: new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.2)' }), diff --git a/examples/dynamic-data.js b/examples/dynamic-data.js index 59393de30d..7c2de24d59 100644 --- a/examples/dynamic-data.js +++ b/examples/dynamic-data.js @@ -7,7 +7,7 @@ import OSM from '../src/ol/source/OSM.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var map = new Map({ @@ -23,7 +23,7 @@ var map = new Map({ }) }); -var imageStyle = new _ol_style_Style_({ +var imageStyle = new Style({ image: new _ol_style_Circle_({ radius: 5, snapToPixel: false, @@ -32,7 +32,7 @@ var imageStyle = new _ol_style_Style_({ }) }); -var headInnerImageStyle = new _ol_style_Style_({ +var headInnerImageStyle = new Style({ image: new _ol_style_Circle_({ radius: 2, snapToPixel: false, @@ -40,7 +40,7 @@ var headInnerImageStyle = new _ol_style_Style_({ }) }); -var headOuterImageStyle = new _ol_style_Style_({ +var headOuterImageStyle = new Style({ image: new _ol_style_Circle_({ radius: 5, snapToPixel: false, diff --git a/examples/earthquake-clusters.js b/examples/earthquake-clusters.js index 7462b90de4..6e9a0e9ed6 100644 --- a/examples/earthquake-clusters.js +++ b/examples/earthquake-clusters.js @@ -13,7 +13,7 @@ import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; @@ -43,7 +43,7 @@ function createEarthquakeStyle(feature) { var magnitude = parseFloat(name.substr(2)); var radius = 5 + 20 * (magnitude - 5); - return new _ol_style_Style_({ + return new Style({ geometry: feature.getGeometry(), image: new _ol_style_RegularShape_({ radius1: radius, @@ -85,7 +85,7 @@ function styleFunction(feature, resolution) { var style; var size = feature.get('features').length; if (size > 1) { - style = new _ol_style_Style_({ + style = new Style({ image: new _ol_style_Circle_({ radius: feature.get('radius'), fill: new _ol_style_Fill_({ @@ -106,7 +106,7 @@ function styleFunction(feature, resolution) { } function selectStyleFunction(feature) { - var styles = [new _ol_style_Style_({ + var styles = [new Style({ image: new _ol_style_Circle_({ radius: feature.get('radius'), fill: invisibleFill diff --git a/examples/earthquake-custom-symbol.js b/examples/earthquake-custom-symbol.js index 6375c0a526..fd3a756a84 100644 --- a/examples/earthquake-custom-symbol.js +++ b/examples/earthquake-custom-symbol.js @@ -10,7 +10,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var symbol = [[0, 0], [4, 2], [6, 0], [10, 5], [6, 3], [4, 5], [0, 0]]; @@ -35,12 +35,12 @@ var styleFunction = function(feature) { var vectorContext = _ol_render_.toContext( /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')), {size: [size, size], pixelRatio: 1}); - vectorContext.setStyle(new _ol_style_Style_({ + vectorContext.setStyle(new Style({ fill: new _ol_style_Fill_({color: 'rgba(255, 153, 0, 0.4)'}), stroke: new _ol_style_Stroke_({color: 'rgba(255, 204, 0, 0.2)', width: 2}) })); vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)])); - style = new _ol_style_Style_({ + style = new Style({ image: new _ol_style_Icon_({ img: canvas, imgSize: [size, size], diff --git a/examples/feature-animation.js b/examples/feature-animation.js index 0631fa4991..77d1d5384a 100644 --- a/examples/feature-animation.js +++ b/examples/feature-animation.js @@ -12,7 +12,7 @@ import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var map = new Map({ @@ -66,7 +66,7 @@ function flash(feature) { var radius = easeOut(elapsedRatio) * 25 + 5; var opacity = easeOut(1 - elapsedRatio); - var style = new _ol_style_Style_({ + var style = new Style({ image: new _ol_style_Circle_({ radius: radius, snapToPixel: false, diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index 43e1157680..c142c2ff4e 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -11,7 +11,7 @@ import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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. // It is usually loaded with AJAX. @@ -85,18 +85,18 @@ var endMarker = new Feature({ }); var styles = { - 'route': new _ol_style_Style_({ + 'route': new Style({ stroke: new _ol_style_Stroke_({ width: 6, color: [237, 212, 0, 0.8] }) }), - 'icon': new _ol_style_Style_({ + 'icon': new Style({ image: new _ol_style_Icon_({ anchor: [0.5, 1], src: 'data/icon.png' }) }), - 'geoMarker': new _ol_style_Style_({ + 'geoMarker': new Style({ image: new _ol_style_Circle_({ radius: 7, snapToPixel: false, diff --git a/examples/flight-animation.js b/examples/flight-animation.js index fdad2f77bd..dbfe79f07d 100644 --- a/examples/flight-animation.js +++ b/examples/flight-animation.js @@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var map = new Map({ layers: [ @@ -25,7 +25,7 @@ var map = new Map({ }) }); -var style = new _ol_style_Style_({ +var style = new Style({ stroke: new _ol_style_Stroke_({ color: '#EAE911', width: 2 diff --git a/examples/geojson.js b/examples/geojson.js index b9c1ea093d..2ec7aa15ce 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -11,7 +11,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var image = new _ol_style_Circle_({ @@ -21,25 +21,25 @@ var image = new _ol_style_Circle_({ }); var styles = { - 'Point': new _ol_style_Style_({ + 'Point': new Style({ image: image }), - 'LineString': new _ol_style_Style_({ + 'LineString': new Style({ stroke: new _ol_style_Stroke_({ color: 'green', width: 1 }) }), - 'MultiLineString': new _ol_style_Style_({ + 'MultiLineString': new Style({ stroke: new _ol_style_Stroke_({ color: 'green', width: 1 }) }), - 'MultiPoint': new _ol_style_Style_({ + 'MultiPoint': new Style({ image: image }), - 'MultiPolygon': new _ol_style_Style_({ + 'MultiPolygon': new Style({ stroke: new _ol_style_Stroke_({ color: 'yellow', width: 1 @@ -48,7 +48,7 @@ var styles = { color: 'rgba(255, 255, 0, 0.1)' }) }), - 'Polygon': new _ol_style_Style_({ + 'Polygon': new Style({ stroke: new _ol_style_Stroke_({ color: 'blue', lineDash: [4], @@ -58,7 +58,7 @@ var styles = { color: 'rgba(0, 0, 255, 0.1)' }) }), - 'GeometryCollection': new _ol_style_Style_({ + 'GeometryCollection': new Style({ stroke: new _ol_style_Stroke_({ color: 'magenta', width: 2 @@ -74,7 +74,7 @@ var styles = { }) }) }), - 'Circle': new _ol_style_Style_({ + 'Circle': new Style({ stroke: new _ol_style_Stroke_({ color: 'red', width: 2 diff --git a/examples/geolocation.js b/examples/geolocation.js index 4660adcadc..a4c5a47b65 100644 --- a/examples/geolocation.js +++ b/examples/geolocation.js @@ -11,7 +11,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var view = new View({ center: [0, 0], @@ -67,7 +67,7 @@ geolocation.on('change:accuracyGeometry', function() { }); var positionFeature = new Feature(); -positionFeature.setStyle(new _ol_style_Style_({ +positionFeature.setStyle(new Style({ image: new _ol_style_Circle_({ radius: 6, fill: new _ol_style_Fill_({ diff --git a/examples/gpx.js b/examples/gpx.js index 19a3322352..d17cac8ca8 100644 --- a/examples/gpx.js +++ b/examples/gpx.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ source: new BingMaps({ @@ -18,7 +18,7 @@ var raster = new TileLayer({ }); var style = { - 'Point': new _ol_style_Style_({ + 'Point': new Style({ image: new _ol_style_Circle_({ fill: new _ol_style_Fill_({ color: 'rgba(255,255,0,0.4)' @@ -30,13 +30,13 @@ var style = { }) }) }), - 'LineString': new _ol_style_Style_({ + 'LineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#f00', width: 3 }) }), - 'MultiLineString': new _ol_style_Style_({ + 'MultiLineString': new Style({ stroke: new _ol_style_Stroke_({ color: '#0f0', width: 3 diff --git a/examples/hit-tolerance.js b/examples/hit-tolerance.js index 8c1b060dfb..24cc041f57 100644 --- a/examples/hit-tolerance.js +++ b/examples/hit-tolerance.js @@ -6,14 +6,14 @@ import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; import Feature from '../src/ol/Feature.js'; import LineString from '../src/ol/geom/LineString.js'; -import _ol_style_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'; var raster = new TileLayer({ source: new OSM() }); -var style = new _ol_style_Style_({ +var style = new Style({ stroke: new _ol_style_Stroke_({ color: 'black', width: 1 diff --git a/examples/icon-color.js b/examples/icon-color.js index b1380ed6b3..330eac4f71 100644 --- a/examples/icon-color.js +++ b/examples/icon-color.js @@ -8,7 +8,7 @@ import {fromLonLat} from '../src/ol/proj.js'; import TileJSON from '../src/ol/source/TileJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var rome = new Feature({ @@ -23,7 +23,7 @@ var madrid = new Feature({ geometry: new Point(fromLonLat([-3.683333, 40.4])) }); -rome.setStyle(new _ol_style_Style_({ +rome.setStyle(new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ color: '#8959A8', crossOrigin: 'anonymous', @@ -31,7 +31,7 @@ rome.setStyle(new _ol_style_Style_({ })) })); -london.setStyle(new _ol_style_Style_({ +london.setStyle(new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ color: '#4271AE', crossOrigin: 'anonymous', @@ -39,7 +39,7 @@ london.setStyle(new _ol_style_Style_({ })) })); -madrid.setStyle(new _ol_style_Style_({ +madrid.setStyle(new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ color: [113, 140, 0], crossOrigin: 'anonymous', diff --git a/examples/icon-negative.js b/examples/icon-negative.js index ad342938b7..5c1288a56a 100644 --- a/examples/icon-negative.js +++ b/examples/icon-negative.js @@ -8,11 +8,11 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; function createStyle(src, img) { - return new _ol_style_Style_({ + return new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ anchor: [0.5, 0.96], crossOrigin: 'anonymous', diff --git a/examples/icon-sprite-webgl.js b/examples/icon-sprite-webgl.js index 3e04f117e6..f0e679da67 100644 --- a/examples/icon-sprite-webgl.js +++ b/examples/icon-sprite-webgl.js @@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var iconInfo = [{ @@ -65,7 +65,7 @@ for (i = 0; i < featureCount; ++i) { [2 * e * Math.random() - e, 2 * e * Math.random() - e]); feature = new Feature(geometry); feature.setStyle( - new _ol_style_Style_({ + new Style({ image: icons[i % (iconCount - 1)] }) ); @@ -101,7 +101,7 @@ new VectorLayer({ source: new VectorSource({ features: overlayFeatures }), - style: new _ol_style_Style_({ + style: new Style({ image: icons[iconCount - 1] }) }); diff --git a/examples/icon.js b/examples/icon.js index a54d17d0b3..795dd0c561 100644 --- a/examples/icon.js +++ b/examples/icon.js @@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import TileJSON from '../src/ol/source/TileJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var iconFeature = new Feature({ @@ -18,7 +18,7 @@ var iconFeature = new Feature({ rainfall: 500 }); -var iconStyle = new _ol_style_Style_({ +var iconStyle = new Style({ image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({ anchor: [0.5, 46], anchorXUnits: 'fraction', diff --git a/examples/igc.js b/examples/igc.js index 2faf483adf..9d652574bf 100644 --- a/examples/igc.js +++ b/examples/igc.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var colors = { @@ -28,7 +28,7 @@ var styleFunction = function(feature) { var color = colors[feature.get('PLT')]; var style = styleCache[color]; if (!style) { - style = new _ol_style_Style_({ + style = new Style({ stroke: new _ol_style_Stroke_({ color: color, width: 3 @@ -156,7 +156,7 @@ var stroke = new _ol_style_Stroke_({ color: 'rgba(255,0,0,0.9)', width: 1 }); -var style = new _ol_style_Style_({ +var style = new Style({ stroke: stroke, image: new _ol_style_Circle_({ radius: 5, @@ -178,7 +178,7 @@ map.on('postcompose', function(evt) { var featureOverlay = new VectorLayer({ source: new VectorSource(), map: map, - style: new _ol_style_Style_({ + style: new Style({ image: new _ol_style_Circle_({ radius: 5, fill: new _ol_style_Fill_({ diff --git a/examples/image-vector-layer.js b/examples/image-vector-layer.js index 55a1d0ed65..2627c065af 100644 --- a/examples/image-vector-layer.js +++ b/examples/image-vector-layer.js @@ -5,11 +5,11 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; -var style = new _ol_style_Style_({ +var style = new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.6)' }), @@ -44,7 +44,7 @@ var map = new Map({ var featureOverlay = new VectorLayer({ source: new VectorSource(), map: map, - style: new _ol_style_Style_({ + style: new Style({ stroke: new _ol_style_Stroke_({ color: '#f00', width: 1 diff --git a/examples/kml-earthquakes.js b/examples/kml-earthquakes.js index f696525a85..c5c315a884 100644 --- a/examples/kml-earthquakes.js +++ b/examples/kml-earthquakes.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var styleCache = {}; @@ -21,7 +21,7 @@ var styleFunction = function(feature) { var radius = 5 + 20 * (magnitude - 5); var style = styleCache[radius]; if (!style) { - style = new _ol_style_Style_({ + style = new Style({ image: new _ol_style_Circle_({ radius: radius, fill: new _ol_style_Fill_({ diff --git a/examples/kml-timezones.js b/examples/kml-timezones.js index 54ea073ebc..88d3849308 100644 --- a/examples/kml-timezones.js +++ b/examples/kml-timezones.js @@ -7,7 +7,7 @@ import Stamen from '../src/ol/source/Stamen.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; /* @@ -35,7 +35,7 @@ var styleFunction = function(feature) { delta = 24 - delta; } var opacity = 0.75 * (1 - delta / 12); - return new _ol_style_Style_({ + return new Style({ fill: new _ol_style_Fill_({ color: [0xff, 0xff, 0x33, opacity] }), diff --git a/examples/layer-z-index.js b/examples/layer-z-index.js index 7d13dd8a62..980faa62db 100644 --- a/examples/layer-z-index.js +++ b/examples/layer-z-index.js @@ -7,13 +7,13 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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 styles = { - 'square': new _ol_style_Style_({ + 'square': new Style({ image: new _ol_style_RegularShape_({ fill: new _ol_style_Fill_({color: 'blue'}), stroke: stroke, @@ -22,7 +22,7 @@ var styles = { angle: Math.PI / 4 }) }), - 'triangle': new _ol_style_Style_({ + 'triangle': new Style({ image: new _ol_style_RegularShape_({ fill: new _ol_style_Fill_({color: 'red'}), stroke: stroke, @@ -32,7 +32,7 @@ var styles = { angle: 0 }) }), - 'star': new _ol_style_Style_({ + 'star': new Style({ image: new _ol_style_RegularShape_({ fill: new _ol_style_Fill_({color: 'green'}), stroke: stroke, diff --git a/examples/line-arrows.js b/examples/line-arrows.js index 14e7310731..1c49d66cc4 100644 --- a/examples/line-arrows.js +++ b/examples/line-arrows.js @@ -8,7 +8,7 @@ import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ source: new OSM() @@ -20,7 +20,7 @@ var styleFunction = function(feature) { var geometry = feature.getGeometry(); var styles = [ // linestring - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: '#ffcc33', width: 2 @@ -33,7 +33,7 @@ var styleFunction = function(feature) { var dy = end[1] - start[1]; var rotation = Math.atan2(dy, dx); // arrows - styles.push(new _ol_style_Style_({ + styles.push(new Style({ geometry: new Point(end), image: new _ol_style_Icon_({ src: 'data/arrow.png', diff --git a/examples/mapbox-vector-tiles-advanced.js b/examples/mapbox-vector-tiles-advanced.js index 7ec9918e69..4359817c5d 100644 --- a/examples/mapbox-vector-tiles-advanced.js +++ b/examples/mapbox-vector-tiles-advanced.js @@ -7,7 +7,7 @@ import VectorTileSource from '../src/ol/source/VectorTile.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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 TileGrid from '../src/ol/tilegrid/TileGrid.js'; @@ -45,7 +45,7 @@ var map = new Map({ }), tileUrlFunction: tileUrlFunction }), - style: createMapboxStreetsV6Style(_ol_style_Style_, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) + style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) }) ], target: 'map', diff --git a/examples/mapbox-vector-tiles.js b/examples/mapbox-vector-tiles.js index 70b138f638..1000b987c1 100644 --- a/examples/mapbox-vector-tiles.js +++ b/examples/mapbox-vector-tiles.js @@ -6,7 +6,7 @@ import VectorTileSource from '../src/ol/source/VectorTile.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; @@ -24,7 +24,7 @@ var map = new Map({ url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + '{z}/{x}/{y}.vector.pbf?access_token=' + key }), - style: createMapboxStreetsV6Style(_ol_style_Style_, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) + style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) }) ], target: 'map', diff --git a/examples/measure.js b/examples/measure.js index 0f7972a1bd..e084737cb1 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -13,7 +13,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ @@ -24,7 +24,7 @@ var source = new VectorSource(); var vector = new VectorLayer({ source: source, - style: new _ol_style_Style_({ + style: new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.2)' }), @@ -180,7 +180,7 @@ function addInteraction() { draw = new Draw({ source: source, type: type, - style: new _ol_style_Style_({ + style: new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.2)' }), diff --git a/examples/modify-test.js b/examples/modify-test.js index 4018f2325a..4652665be3 100644 --- a/examples/modify-test.js +++ b/examples/modify-test.js @@ -9,7 +9,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var styleFunction = (function() { @@ -19,8 +19,8 @@ var styleFunction = (function() { fill: null, stroke: new _ol_style_Stroke_({color: 'orange', width: 2}) }); - styles['Point'] = new _ol_style_Style_({image: image}); - styles['Polygon'] = new _ol_style_Style_({ + styles['Point'] = new Style({image: image}); + styles['Polygon'] = new Style({ stroke: new _ol_style_Stroke_({ color: 'blue', width: 3 @@ -29,13 +29,13 @@ var styleFunction = (function() { color: 'rgba(0, 0, 255, 0.1)' }) }); - styles['MultiLineString'] = new _ol_style_Style_({ + styles['MultiLineString'] = new Style({ stroke: new _ol_style_Stroke_({ color: 'green', width: 3 }) }); - styles['MultiPolygon'] = new _ol_style_Style_({ + styles['MultiPolygon'] = new Style({ stroke: new _ol_style_Stroke_({ color: 'yellow', width: 1 @@ -44,7 +44,7 @@ var styleFunction = (function() { color: 'rgba(255, 255, 0, 0.1)' }) }); - styles['default'] = new _ol_style_Style_({ + styles['default'] = new Style({ stroke: new _ol_style_Stroke_({ color: 'red', width: 3 @@ -156,18 +156,18 @@ var layer = new VectorLayer({ var overlayStyle = (function() { var styles = {}; styles['Polygon'] = [ - new _ol_style_Style_({ + new Style({ fill: new _ol_style_Fill_({ color: [255, 255, 255, 0.5] }) }), - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: [255, 255, 255, 1], width: 5 }) }), - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: [0, 153, 255, 1], width: 3 @@ -177,13 +177,13 @@ var overlayStyle = (function() { styles['MultiPolygon'] = styles['Polygon']; styles['LineString'] = [ - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: [255, 255, 255, 1], width: 5 }) }), - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: [0, 153, 255, 1], width: 3 @@ -193,7 +193,7 @@ var overlayStyle = (function() { styles['MultiLineString'] = styles['LineString']; styles['Point'] = [ - new _ol_style_Style_({ + new Style({ image: new _ol_style_Circle_({ radius: 7, fill: new _ol_style_Fill_({ diff --git a/examples/osm-vector-tiles.js b/examples/osm-vector-tiles.js index b949154975..dd490963c1 100644 --- a/examples/osm-vector-tiles.js +++ b/examples/osm-vector-tiles.js @@ -6,7 +6,7 @@ import {fromLonLat} from '../src/ol/proj.js'; import VectorTileSource from '../src/ol/source/VectorTile.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var key = 'vector-tiles-5eJz6JX'; @@ -16,7 +16,7 @@ var roadColor = { 'minor_road': '#ccb', 'highway': '#f39' }; -var buildingStyle = new _ol_style_Style_({ +var buildingStyle = new Style({ fill: new _ol_style_Fill_({ color: '#666', opacity: 0.4 @@ -26,7 +26,7 @@ var buildingStyle = new _ol_style_Style_({ width: 1 }) }); -var waterStyle = new _ol_style_Style_({ +var waterStyle = new Style({ fill: new _ol_style_Fill_({ color: '#9db9e8' }) @@ -46,7 +46,7 @@ var roadStyle = function(feature) { color = roadColor[kind]; width = kind == 'highway' ? 1.5 : 1; } - style = new _ol_style_Style_({ + style = new Style({ stroke: new _ol_style_Stroke_({ color: color, width: width diff --git a/examples/polygon-styles.js b/examples/polygon-styles.js index 20947b5126..8134f5762d 100644 --- a/examples/polygon-styles.js +++ b/examples/polygon-styles.js @@ -7,7 +7,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var styles = [ /* We are using two different styles for the polygons: @@ -17,7 +17,7 @@ var styles = [ * returned as `MultiPoint` geometry, which will be used to render * the style. */ - new _ol_style_Style_({ + new Style({ stroke: new _ol_style_Stroke_({ color: 'blue', width: 3 @@ -26,7 +26,7 @@ var styles = [ color: 'rgba(0, 0, 255, 0.1)' }) }), - new _ol_style_Style_({ + new Style({ image: new _ol_style_Circle_({ radius: 5, fill: new _ol_style_Fill_({ diff --git a/examples/regularshape.js b/examples/regularshape.js index 88dde56b95..fde861489b 100644 --- a/examples/regularshape.js +++ b/examples/regularshape.js @@ -7,14 +7,14 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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 fill = new _ol_style_Fill_({color: 'red'}); var styles = { - 'square': new _ol_style_Style_({ + 'square': new Style({ image: new _ol_style_RegularShape_({ fill: fill, stroke: stroke, @@ -23,7 +23,7 @@ var styles = { angle: Math.PI / 4 }) }), - 'triangle': new _ol_style_Style_({ + 'triangle': new Style({ image: new _ol_style_RegularShape_({ fill: fill, stroke: stroke, @@ -33,7 +33,7 @@ var styles = { angle: 0 }) }), - 'star': new _ol_style_Style_({ + 'star': new Style({ image: new _ol_style_RegularShape_({ fill: fill, stroke: stroke, @@ -43,7 +43,7 @@ var styles = { angle: 0 }) }), - 'cross': new _ol_style_Style_({ + 'cross': new Style({ image: new _ol_style_RegularShape_({ fill: fill, stroke: stroke, @@ -53,7 +53,7 @@ var styles = { angle: 0 }) }), - 'x': new _ol_style_Style_({ + 'x': new Style({ image: new _ol_style_RegularShape_({ fill: fill, stroke: stroke, diff --git a/examples/render-geometry.js b/examples/render-geometry.js index d12cc98479..cafd0d616f 100644 --- a/examples/render-geometry.js +++ b/examples/render-geometry.js @@ -5,7 +5,7 @@ import _ol_render_ from '../src/ol/render.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var canvas = document.getElementById('canvas'); @@ -13,7 +13,7 @@ var vectorContext = _ol_render_.toContext(canvas.getContext('2d'), {size: [100, var fill = new _ol_style_Fill_({color: 'blue'}); var stroke = new _ol_style_Stroke_({color: 'black'}); -var style = new _ol_style_Style_({ +var style = new Style({ fill: fill, stroke: stroke, image: new _ol_style_Circle_({ diff --git a/examples/snap.js b/examples/snap.js index 7a78c7105e..964f1220a5 100644 --- a/examples/snap.js +++ b/examples/snap.js @@ -11,7 +11,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ source: new OSM() @@ -19,7 +19,7 @@ var raster = new TileLayer({ var vector = new VectorLayer({ source: new VectorSource(), - style: new _ol_style_Style_({ + style: new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.2)' }), diff --git a/examples/street-labels.js b/examples/street-labels.js index fc2f0c9db5..56f1a4490d 100644 --- a/examples/street-labels.js +++ b/examples/street-labels.js @@ -7,10 +7,10 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; -import _ol_style_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'; -var style = new _ol_style_Style_({ +var style = new Style({ text: new _ol_style_Text_({ font: 'bold 11px "Open Sans", "Arial Unicode MS", "sans-serif"', placement: 'line', diff --git a/examples/symbol-atlas-webgl.js b/examples/symbol-atlas-webgl.js index 1849c5fd5c..35dfb9da4c 100644 --- a/examples/symbol-atlas-webgl.js +++ b/examples/symbol-atlas-webgl.js @@ -9,7 +9,7 @@ import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var atlasManager = new AtlasManager({ // we increase the initial size so that all symbols fit into @@ -92,7 +92,7 @@ for (i = 0; i < featureCount; ++i) { [2 * e * Math.random() - e, 2 * e * Math.random() - e]); feature = new Feature(geometry); feature.setStyle( - new _ol_style_Style_({ + new Style({ image: symbols[i % symbolCount] }) ); diff --git a/examples/synthetic-lines.js b/examples/synthetic-lines.js index a5e41f051b..511e8fb2c2 100644 --- a/examples/synthetic-lines.js +++ b/examples/synthetic-lines.js @@ -5,7 +5,7 @@ import LineString from '../src/ol/geom/LineString.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var count = 10000; @@ -41,7 +41,7 @@ var vector = new VectorLayer({ features: features, wrapX: false }), - style: new _ol_style_Style_({ + style: new Style({ stroke: new _ol_style_Stroke_({ color: '#666666', width: 1 diff --git a/examples/synthetic-points.js b/examples/synthetic-points.js index 84b48cbd0f..51f5a3fafe 100644 --- a/examples/synthetic-points.js +++ b/examples/synthetic-points.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var count = 20000; @@ -24,14 +24,14 @@ for (var i = 0; i < count; ++i) { } var styles = { - '10': new _ol_style_Style_({ + '10': new Style({ image: new _ol_style_Circle_({ radius: 5, fill: new _ol_style_Fill_({color: '#666666'}), stroke: new _ol_style_Stroke_({color: '#bada55', width: 1}) }) }), - '20': new _ol_style_Style_({ + '20': new Style({ image: new _ol_style_Circle_({ radius: 10, fill: new _ol_style_Fill_({color: '#666666'}), @@ -100,7 +100,7 @@ var stroke = new _ol_style_Stroke_({ color: 'rgba(255,255,0,0.9)', width: 3 }); -var style = new _ol_style_Style_({ +var style = new Style({ stroke: stroke, image: new _ol_style_Circle_({ radius: 10, diff --git a/examples/topojson.js b/examples/topojson.js index 7f2b92922e..fcc39c7667 100644 --- a/examples/topojson.js +++ b/examples/topojson.js @@ -7,7 +7,7 @@ import TileJSON from '../src/ol/source/TileJSON.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var raster = new TileLayer({ @@ -16,7 +16,7 @@ var raster = new TileLayer({ }) }); -var style = new _ol_style_Style_({ +var style = new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.6)' }), diff --git a/examples/topolis.js b/examples/topolis.js index 771e03bf60..e018f792cd 100644 --- a/examples/topolis.js +++ b/examples/topolis.js @@ -13,7 +13,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; @@ -28,7 +28,7 @@ var nodes = new VectorSource({wrapX: false}); var nodesLayer = new VectorLayer({ source: nodes, style: function(f) { - var style = new _ol_style_Style_({ + var style = new Style({ image: new _ol_style_Circle_({ radius: 8, fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.2)'}), @@ -51,7 +51,7 @@ var edges = new VectorSource({wrapX: false}); var edgesLayer = new VectorLayer({ source: edges, style: function(f) { - var style = new _ol_style_Style_({ + var style = new Style({ stroke: new _ol_style_Stroke_({ color: 'blue', width: 1 @@ -73,7 +73,7 @@ var faces = new VectorSource({wrapX: false}); var facesLayer = new VectorLayer({ source: faces, style: function(f) { - var style = new _ol_style_Style_({ + var style = new Style({ stroke: new _ol_style_Stroke_({ color: 'black', width: 1 diff --git a/examples/vector-esri.js b/examples/vector-esri.js index c281795d51..b7ea164b4e 100644 --- a/examples/vector-esri.js +++ b/examples/vector-esri.js @@ -9,7 +9,7 @@ import VectorSource from '../src/ol/source/Vector.js'; import XYZ from '../src/ol/source/XYZ.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; import _ol_tilegrid_ from '../src/ol/tilegrid.js'; @@ -20,7 +20,7 @@ var layer = '0'; var esrijsonFormat = new EsriJSON(); var styleCache = { - 'ABANDONED': new _ol_style_Style_({ + 'ABANDONED': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(225, 225, 225, 255)' }), @@ -29,7 +29,7 @@ var styleCache = { width: 0.4 }) }), - 'GAS': new _ol_style_Style_({ + 'GAS': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 0, 0, 255)' }), @@ -38,7 +38,7 @@ var styleCache = { width: 0.4 }) }), - 'OIL': new _ol_style_Style_({ + 'OIL': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(56, 168, 0, 255)' }), @@ -47,7 +47,7 @@ var styleCache = { width: 0 }) }), - 'OILGAS': new _ol_style_Style_({ + 'OILGAS': new Style({ fill: new _ol_style_Fill_({ color: 'rgba(168, 112, 0, 255)' }), diff --git a/examples/vector-label-decluttering.js b/examples/vector-label-decluttering.js index 5557e09e50..9b65088cb6 100644 --- a/examples/vector-label-decluttering.js +++ b/examples/vector-label-decluttering.js @@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; var map = new Map({ @@ -17,7 +17,7 @@ var map = new Map({ }) }); -var labelStyle = new _ol_style_Style_({ +var labelStyle = new Style({ geometry: function(feature) { var geometry = feature.getGeometry(); if (geometry.getType() == 'MultiPolygon') { @@ -47,7 +47,7 @@ var labelStyle = new _ol_style_Style_({ }) }) }); -var countryStyle = new _ol_style_Style_({ +var countryStyle = new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.6)' }), diff --git a/examples/vector-labels.js b/examples/vector-labels.js index 1b2e65e382..a2ba95e8a9 100644 --- a/examples/vector-labels.js +++ b/examples/vector-labels.js @@ -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_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; var openSansAdded = false; @@ -128,7 +128,7 @@ var createTextStyle = function(feature, resolution, dom) { // Polygons function polygonStyleFunction(feature, resolution) { - return new _ol_style_Style_({ + return new Style({ stroke: new _ol_style_Stroke_({ color: 'blue', width: 1 @@ -151,7 +151,7 @@ var vectorPolygons = new VectorLayer({ // Lines function lineStyleFunction(feature, resolution) { - return new _ol_style_Style_({ + return new Style({ stroke: new _ol_style_Stroke_({ color: 'green', width: 2 @@ -171,7 +171,7 @@ var vectorLines = new VectorLayer({ // Points function pointStyleFunction(feature, resolution) { - return new _ol_style_Style_({ + return new Style({ image: new _ol_style_Circle_({ radius: 10, fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.1)'}), diff --git a/examples/vector-layer.js b/examples/vector-layer.js index 22dcd5e206..8f5d7df56d 100644 --- a/examples/vector-layer.js +++ b/examples/vector-layer.js @@ -5,11 +5,11 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_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'; -var style = new _ol_style_Style_({ +var style = new Style({ fill: new _ol_style_Fill_({ color: 'rgba(255, 255, 255, 0.6)' }), @@ -49,7 +49,7 @@ var map = new Map({ }) }); -var highlightStyle = new _ol_style_Style_({ +var highlightStyle = new Style({ stroke: new _ol_style_Stroke_({ color: '#f00', width: 1 diff --git a/examples/vector-osm.js b/examples/vector-osm.js index d42d9521cb..3f1d953415 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -11,13 +11,13 @@ import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var map; var styles = { 'amenity': { - 'parking': new _ol_style_Style_({ + 'parking': new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(170, 170, 170, 1.0)', width: 1 @@ -28,7 +28,7 @@ var styles = { }) }, 'building': { - '.*': new _ol_style_Style_({ + '.*': new Style({ zIndex: 100, stroke: new _ol_style_Stroke_({ color: 'rgba(246, 99, 79, 1.0)', @@ -40,13 +40,13 @@ var styles = { }) }, 'highway': { - 'service': new _ol_style_Style_({ + 'service': new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(255, 255, 255, 1.0)', width: 2 }) }), - '.*': new _ol_style_Style_({ + '.*': new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(255, 255, 255, 1.0)', width: 3 @@ -54,7 +54,7 @@ var styles = { }) }, 'landuse': { - 'forest|grass|allotments': new _ol_style_Style_({ + 'forest|grass|allotments': new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(140, 208, 95, 1.0)', width: 1 @@ -65,7 +65,7 @@ var styles = { }) }, 'natural': { - 'tree': new _ol_style_Style_({ + 'tree': new Style({ image: new _ol_style_Circle_({ radius: 2, fill: new _ol_style_Fill_({ diff --git a/examples/vector-wfs-getfeature.js b/examples/vector-wfs-getfeature.js index 6a64ddbd5f..871efe3f5a 100644 --- a/examples/vector-wfs-getfeature.js +++ b/examples/vector-wfs-getfeature.js @@ -8,13 +8,13 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var vectorSource = new VectorSource(); var vector = new VectorLayer({ source: vectorSource, - style: new _ol_style_Style_({ + style: new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(0, 0, 255, 1.0)', width: 2 diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js index 01d9a85efe..c144c9a2ad 100644 --- a/examples/vector-wfs.js +++ b/examples/vector-wfs.js @@ -7,7 +7,7 @@ import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import BingMaps from '../src/ol/source/BingMaps.js'; import VectorSource from '../src/ol/source/Vector.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; -import _ol_style_Style_ from '../src/ol/style/Style.js'; +import Style from '../src/ol/style/Style.js'; var vectorSource = new VectorSource({ @@ -24,7 +24,7 @@ var vectorSource = new VectorSource({ var vector = new VectorLayer({ source: vectorSource, - style: new _ol_style_Style_({ + style: new Style({ stroke: new _ol_style_Stroke_({ color: 'rgba(0, 0, 255, 1.0)', width: 2 diff --git a/src/ol/Feature.js b/src/ol/Feature.js index 6e9e78ff97..639aa36210 100644 --- a/src/ol/Feature.js +++ b/src/ol/Feature.js @@ -7,7 +7,7 @@ import EventType from './events/EventType.js'; import {inherits} from './index.js'; import BaseObject from './Object.js'; import Geometry from './geom/Geometry.js'; -import _ol_style_Style_ from './style/Style.js'; +import Style from './style/Style.js'; /** * @classdesc @@ -307,7 +307,7 @@ Feature.createStyleFunction = function(obj) { if (Array.isArray(obj)) { styles = obj; } else { - assert(obj instanceof _ol_style_Style_, + assert(obj instanceof Style, 41); // Expected an `ol.style.Style` or an array of `ol.style.Style` styles = [obj]; } diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 3fcbf66bc4..394fcb86c3 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -25,7 +25,7 @@ import _ol_style_Icon_ from '../style/Icon.js'; import IconAnchorUnits from '../style/IconAnchorUnits.js'; import IconOrigin from '../style/IconOrigin.js'; import _ol_style_Stroke_ from '../style/Stroke.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; import _ol_style_Text_ from '../style/Text.js'; import _ol_xml_ from '../xml.js'; @@ -253,7 +253,7 @@ KML.createStyleDefaults_ = function() { * @type {ol.style.Style} * @private */ - KML.DEFAULT_STYLE_ = new _ol_style_Style_({ + KML.DEFAULT_STYLE_ = new Style({ fill: KML.DEFAULT_FILL_STYLE_, image: KML.DEFAULT_IMAGE_STYLE_, text: KML.DEFAULT_TEXT_STYLE_, @@ -325,7 +325,7 @@ KML.createNameStyleFunction_ = function(foundStyle, name) { textStyle.setOffsetY(textOffset[1]); textStyle.setTextAlign(textAlign); - var nameStyle = new _ol_style_Style_({ + var nameStyle = new Style({ text: textStyle }); return nameStyle; @@ -1042,7 +1042,7 @@ KML.readStyle_ = function(node, objectStack) { if (outline !== undefined && !outline) { strokeStyle = null; } - return [new _ol_style_Style_({ + return [new Style({ fill: fillStyle, image: imageStyle, stroke: strokeStyle, diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index b7d4633eb9..dec83deed4 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -24,7 +24,7 @@ import PointerInteraction from '../interaction/Pointer.js'; import InteractionProperty from '../interaction/Property.js'; import VectorLayer from '../layer/Vector.js'; import VectorSource from '../source/Vector.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** * @classdesc @@ -297,7 +297,7 @@ inherits(Draw, PointerInteraction); * @return {ol.StyleFunction} Styles. */ Draw.getDefaultStyleFunction = function() { - var styles = _ol_style_Style_.createDefaultEditing(); + var styles = Style.createDefaultEditing(); return function(feature, resolution) { return styles[feature.getGeometry().getType()]; }; diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index 0ec6a26a79..a85ebae843 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -15,7 +15,7 @@ import _ol_interaction_ExtentEventType_ from '../interaction/ExtentEventType.js' import PointerInteraction from '../interaction/Pointer.js'; import VectorLayer from '../layer/Vector.js'; import VectorSource from '../source/Vector.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** * @classdesc @@ -243,7 +243,7 @@ ExtentInteraction.handleUpEvent_ = function(mapBrowserEvent) { * @private */ ExtentInteraction.getDefaultExtentStyleFunction_ = function() { - var style = _ol_style_Style_.createDefaultEditing(); + var style = Style.createDefaultEditing(); return function(feature, resolution) { return style[GeometryType.POLYGON]; }; @@ -256,7 +256,7 @@ ExtentInteraction.getDefaultExtentStyleFunction_ = function() { * @private */ ExtentInteraction.getDefaultPointerStyleFunction_ = function() { - var style = _ol_style_Style_.createDefaultEditing(); + var style = Style.createDefaultEditing(); return function(feature, resolution) { return style[GeometryType.POINT]; }; diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index 21f5106918..f8ceae718d 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -22,7 +22,7 @@ import VectorLayer from '../layer/Vector.js'; import VectorSource from '../source/Vector.js'; import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** * @classdesc @@ -1193,7 +1193,7 @@ Modify.prototype.updateSegmentIndices_ = function( * @return {ol.StyleFunction} Styles. */ Modify.getDefaultStyleFunction = function() { - var style = _ol_style_Style_.createDefaultEditing(); + var style = Style.createDefaultEditing(); return function(feature, resolution) { return style[GeometryType.POINT]; }; diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index c6f38bc626..2cd9d10a5f 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -13,7 +13,7 @@ import Interaction from '../interaction/Interaction.js'; import VectorLayer from '../layer/Vector.js'; import _ol_obj_ from '../obj.js'; import VectorSource from '../source/Vector.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** * @classdesc @@ -325,7 +325,7 @@ Select.prototype.setMap = function(map) { * @return {ol.StyleFunction} Styles. */ Select.getDefaultStyleFunction = function() { - var styles = _ol_style_Style_.createDefaultEditing(); + var styles = Style.createDefaultEditing(); extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]); extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]); diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 25397b799f..a3080db07c 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -10,7 +10,7 @@ import {clamp} from '../math.js'; import _ol_obj_ from '../obj.js'; import RenderEventType from '../render/EventType.js'; import _ol_style_Icon_ from '../style/Icon.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** @@ -117,7 +117,7 @@ var Heatmap = function(opt_options) { var style = this.styleCache_[index]; if (!style) { style = [ - new _ol_style_Style_({ + new Style({ image: new _ol_style_Icon_({ opacity: opacity, src: this.circleImage_ diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index 8a2f31c3e9..ea94399be8 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -6,7 +6,7 @@ import LayerType from '../LayerType.js'; import Layer from '../layer/Layer.js'; import _ol_layer_VectorRenderType_ from '../layer/VectorRenderType.js'; import _ol_obj_ from '../obj.js'; -import _ol_style_Style_ from '../style/Style.js'; +import Style from '../style/Style.js'; /** @@ -207,9 +207,9 @@ VectorLayer.prototype.setRenderOrder = function(renderOrder) { * @api */ VectorLayer.prototype.setStyle = function(style) { - this.style_ = style !== undefined ? style : _ol_style_Style_.defaultFunction; + this.style_ = style !== undefined ? style : Style.defaultFunction; this.styleFunction_ = style === null ? - undefined : _ol_style_Style_.createFunction(this.style_); + undefined : Style.createFunction(this.style_); this.changed(); }; diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js index a179d34816..7185da082f 100644 --- a/src/ol/style/Style.js +++ b/src/ol/style/Style.js @@ -18,7 +18,7 @@ import _ol_style_Stroke_ from '../style/Stroke.js'; * @param {olx.style.StyleOptions=} opt_options Style options. * @api */ -var _ol_style_Style_ = function(opt_options) { +var Style = function(opt_options) { var options = opt_options || {}; @@ -32,7 +32,7 @@ var _ol_style_Style_ = function(opt_options) { * @private * @type {!ol.StyleGeometryFunction} */ - this.geometryFunction_ = _ol_style_Style_.defaultGeometryFunction; + this.geometryFunction_ = Style.defaultGeometryFunction; if (options.geometry !== undefined) { this.setGeometry(options.geometry); @@ -82,12 +82,12 @@ var _ol_style_Style_ = function(opt_options) { * @return {ol.style.Style} The cloned style. * @api */ -_ol_style_Style_.prototype.clone = function() { +Style.prototype.clone = function() { var geometry = this.getGeometry(); if (geometry && geometry.clone) { geometry = geometry.clone(); } - return new _ol_style_Style_({ + return new Style({ geometry: geometry, fill: this.getFill() ? this.getFill().clone() : undefined, image: this.getImage() ? this.getImage().clone() : undefined, @@ -104,7 +104,7 @@ _ol_style_Style_.prototype.clone = function() { * @return {ol.StyleRenderFunction|null} Custom renderer function. * @api */ -_ol_style_Style_.prototype.getRenderer = function() { +Style.prototype.getRenderer = function() { return this.renderer_; }; @@ -115,7 +115,7 @@ _ol_style_Style_.prototype.getRenderer = function() { * @param {ol.StyleRenderFunction|null} renderer Custom renderer function. * @api */ -_ol_style_Style_.prototype.setRenderer = function(renderer) { +Style.prototype.setRenderer = function(renderer) { this.renderer_ = renderer; }; @@ -127,7 +127,7 @@ _ol_style_Style_.prototype.setRenderer = function(renderer) { * be rendered with this style. * @api */ -_ol_style_Style_.prototype.getGeometry = function() { +Style.prototype.getGeometry = function() { return this.geometry_; }; @@ -138,7 +138,7 @@ _ol_style_Style_.prototype.getGeometry = function() { * and returns the geometry to render instead of the feature's geometry. * @api */ -_ol_style_Style_.prototype.getGeometryFunction = function() { +Style.prototype.getGeometryFunction = function() { return this.geometryFunction_; }; @@ -148,7 +148,7 @@ _ol_style_Style_.prototype.getGeometryFunction = function() { * @return {ol.style.Fill} Fill style. * @api */ -_ol_style_Style_.prototype.getFill = function() { +Style.prototype.getFill = function() { return this.fill_; }; @@ -158,7 +158,7 @@ _ol_style_Style_.prototype.getFill = function() { * @param {ol.style.Fill} fill Fill style. * @api */ -_ol_style_Style_.prototype.setFill = function(fill) { +Style.prototype.setFill = function(fill) { this.fill_ = fill; }; @@ -168,7 +168,7 @@ _ol_style_Style_.prototype.setFill = function(fill) { * @return {ol.style.Image} Image style. * @api */ -_ol_style_Style_.prototype.getImage = function() { +Style.prototype.getImage = function() { return this.image_; }; @@ -178,7 +178,7 @@ _ol_style_Style_.prototype.getImage = function() { * @param {ol.style.Image} image Image style. * @api */ -_ol_style_Style_.prototype.setImage = function(image) { +Style.prototype.setImage = function(image) { this.image_ = image; }; @@ -188,7 +188,7 @@ _ol_style_Style_.prototype.setImage = function(image) { * @return {ol.style.Stroke} Stroke style. * @api */ -_ol_style_Style_.prototype.getStroke = function() { +Style.prototype.getStroke = function() { return this.stroke_; }; @@ -198,7 +198,7 @@ _ol_style_Style_.prototype.getStroke = function() { * @param {ol.style.Stroke} stroke Stroke style. * @api */ -_ol_style_Style_.prototype.setStroke = function(stroke) { +Style.prototype.setStroke = function(stroke) { this.stroke_ = stroke; }; @@ -208,7 +208,7 @@ _ol_style_Style_.prototype.setStroke = function(stroke) { * @return {ol.style.Text} Text style. * @api */ -_ol_style_Style_.prototype.getText = function() { +Style.prototype.getText = function() { return this.text_; }; @@ -218,7 +218,7 @@ _ol_style_Style_.prototype.getText = function() { * @param {ol.style.Text} text Text style. * @api */ -_ol_style_Style_.prototype.setText = function(text) { +Style.prototype.setText = function(text) { this.text_ = text; }; @@ -228,7 +228,7 @@ _ol_style_Style_.prototype.setText = function(text) { * @return {number|undefined} ZIndex. * @api */ -_ol_style_Style_.prototype.getZIndex = function() { +Style.prototype.getZIndex = function() { return this.zIndex_; }; @@ -241,7 +241,7 @@ _ol_style_Style_.prototype.getZIndex = function() { * for this style. * @api */ -_ol_style_Style_.prototype.setGeometry = function(geometry) { +Style.prototype.setGeometry = function(geometry) { if (typeof geometry === 'function') { this.geometryFunction_ = geometry; } else if (typeof geometry === 'string') { @@ -249,7 +249,7 @@ _ol_style_Style_.prototype.setGeometry = function(geometry) { return /** @type {ol.geom.Geometry} */ (feature.get(geometry)); }; } else if (!geometry) { - this.geometryFunction_ = _ol_style_Style_.defaultGeometryFunction; + this.geometryFunction_ = Style.defaultGeometryFunction; } else if (geometry !== undefined) { this.geometryFunction_ = function() { return /** @type {ol.geom.Geometry} */ (geometry); @@ -265,7 +265,7 @@ _ol_style_Style_.prototype.setGeometry = function(geometry) { * @param {number|undefined} zIndex ZIndex. * @api */ -_ol_style_Style_.prototype.setZIndex = function(zIndex) { +Style.prototype.setZIndex = function(zIndex) { this.zIndex_ = zIndex; }; @@ -278,7 +278,7 @@ _ol_style_Style_.prototype.setZIndex = function(zIndex) { * A style function, a single style, or an array of styles. * @return {ol.StyleFunction} A style function. */ -_ol_style_Style_.createFunction = function(obj) { +Style.createFunction = function(obj) { var styleFunction; if (typeof obj === 'function') { @@ -291,7 +291,7 @@ _ol_style_Style_.createFunction = function(obj) { if (Array.isArray(obj)) { styles = obj; } else { - assert(obj instanceof _ol_style_Style_, + assert(obj instanceof Style, 41); // Expected an `ol.style.Style` or an array of `ol.style.Style` styles = [obj]; } @@ -307,7 +307,7 @@ _ol_style_Style_.createFunction = function(obj) { * @type {Array.