Rename _ol_layer_Vector_ to VectorLayer

This commit is contained in:
Tim Schaub
2018-01-08 10:05:12 -07:00
parent 24dd0ca924
commit 45c6e43b42
90 changed files with 246 additions and 246 deletions

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -14,7 +14,7 @@ import _ol_style_Style_ from '../src/ol/style/Style.js';
// //
// Every layer has one feature that is styled with a circle, together the // Every layer has one feature that is styled with a circle, together the
// features form the corners of an equilateral triangle and their styles overlap // features form the corners of an equilateral triangle and their styles overlap
var redLayer = new _ol_layer_Vector_({ var redLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [new Feature(new Point([0, 0]))] features: [new Feature(new Point([0, 0]))]
}), }),
@@ -31,7 +31,7 @@ var redLayer = new _ol_layer_Vector_({
}) })
}) })
}); });
var greenLayer = new _ol_layer_Vector_({ var greenLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
// 433.013 is roughly 250 * Math.sqrt(3) // 433.013 is roughly 250 * Math.sqrt(3)
features: [new Feature(new Point([250, 433.013]))] features: [new Feature(new Point([250, 433.013]))]
@@ -49,7 +49,7 @@ var greenLayer = new _ol_layer_Vector_({
}) })
}) })
}); });
var blueLayer = new _ol_layer_Vector_({ var blueLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [new Feature(new Point([500, 0]))] features: [new Feature(new Point([500, 0]))]
}), }),

View File

@@ -5,7 +5,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
import DragBox from '../src/ol/interaction/DragBox.js'; import DragBox from '../src/ol/interaction/DragBox.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -21,7 +21,7 @@ var map = new Map({
new TileLayer({ new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}), }),
new _ol_layer_Vector_({ new VectorLayer({
source: vectorSource source: vectorSource
}) })
], ],

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js'; import * as _ol_extent_ from '../src/ol/extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_has_ from '../src/ol/has.js'; import _ol_has_ from '../src/ol/has.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -81,7 +81,7 @@ var getStackedStyle = function(feature, resolution) {
}; };
// Create a vector layer that makes use of the style function above… // Create a vector layer that makes use of the style function above…
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import {defaults as defaultControls} from '../src/ol/control.js'; import {defaults as defaultControls} from '../src/ol/control.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -34,7 +34,7 @@ var style = new _ol_style_Style_({
}) })
}) })
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: source, source: source,
style: style style: style
}); });

View File

@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Cluster_ from '../src/ol/source/Cluster.js'; import _ol_source_Cluster_ from '../src/ol/source/Cluster.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -34,7 +34,7 @@ var clusterSource = new _ol_source_Cluster_({
}); });
var styleCache = {}; var styleCache = {};
var clusters = new _ol_layer_Vector_({ var clusters = new VectorLayer({
source: clusterSource, source: clusterSource,
style: function(feature) { style: function(feature) {
var size = feature.get('features').length; var size = feature.get('features').length;

View File

@@ -8,7 +8,7 @@ import Polygon from '../src/ol/geom/Polygon.js';
import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import _ol_interaction_Pointer_ from '../src/ol/interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../src/ol/interaction/Pointer.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -152,7 +152,7 @@ var map = new Map({
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure' url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure'
}) })
}), }),
new _ol_layer_Vector_({ new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [pointFeature, lineFeature, polygonFeature] features: [pointFeature, lineFeature, polygonFeature]
}), }),

View File

@@ -7,7 +7,7 @@ import KML from '../src/ol/format/KML.js';
import TopoJSON from '../src/ol/format/TopoJSON.js'; import TopoJSON from '../src/ol/format/TopoJSON.js';
import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import DragAndDrop from '../src/ol/interaction/DragAndDrop.js'; import DragAndDrop from '../src/ol/interaction/DragAndDrop.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; 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 _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -114,7 +114,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
var vectorSource = new _ol_source_Vector_({ var vectorSource = new _ol_source_Vector_({
features: event.features features: event.features
}); });
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: vectorSource, source: vectorSource,
style: styleFunction style: styleFunction

View File

@@ -8,7 +8,7 @@ import TopoJSON from '../src/ol/format/TopoJSON.js';
import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import DragAndDrop from '../src/ol/interaction/DragAndDrop.js'; import DragAndDrop from '../src/ol/interaction/DragAndDrop.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -114,7 +114,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
var vectorSource = new _ol_source_Vector_({ var vectorSource = new _ol_source_Vector_({
features: event.features features: event.features
}); });
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: vectorSource, source: vectorSource,
style: styleFunction style: styleFunction
})); }));

View File

@@ -4,7 +4,7 @@ import Draw from '../src/ol/interaction/Draw.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js'; import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -17,7 +17,7 @@ var raster = new TileLayer({
}); });
var source = new _ol_source_Vector_(); var source = new _ol_source_Vector_();
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
fill: new _ol_style_Fill_({ fill: new _ol_style_Fill_({

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -12,7 +12,7 @@ var raster = new TileLayer({
var source = new _ol_source_Vector_({wrapX: false}); var source = new _ol_source_Vector_({wrapX: false});
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source source: source
}); });

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -12,7 +12,7 @@ var raster = new TileLayer({
var source = new _ol_source_Vector_({wrapX: false}); var source = new _ol_source_Vector_({wrapX: false});
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source source: source
}); });

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import Polygon from '../src/ol/geom/Polygon.js'; import Polygon from '../src/ol/geom/Polygon.js';
import Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -13,7 +13,7 @@ var raster = new TileLayer({
var source = new _ol_source_Vector_({wrapX: false}); var source = new _ol_source_Vector_({wrapX: false});
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source source: source
}); });

View File

@@ -5,7 +5,7 @@ import KML from '../src/ol/format/KML.js';
import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Cluster_ from '../src/ol/source/Cluster.js'; import _ol_source_Cluster_ from '../src/ol/source/Cluster.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -121,7 +121,7 @@ function selectStyleFunction(feature) {
return styles; return styles;
} }
vector = new _ol_layer_Vector_({ vector = new VectorLayer({
source: new _ol_source_Cluster_({ source: new _ol_source_Cluster_({
distance: 40, distance: 40,
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import KML from '../src/ol/format/KML.js'; import KML from '../src/ol/format/KML.js';
import Polygon from '../src/ol/geom/Polygon.js'; import Polygon from '../src/ol/geom/Polygon.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_render_ from '../src/ol/render.js'; import _ol_render_ from '../src/ol/render.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -52,7 +52,7 @@ var styleFunction = function(feature) {
return style; return style;
}; };
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/kml/2012_Earthquakes_Mag5.kml', url: 'data/kml/2012_Earthquakes_Mag5.kml',
format: new KML({ format: new KML({

View File

@@ -5,7 +5,7 @@ import View from '../src/ol/View.js';
import {defaults as defaultControls} from '../src/ol/control.js'; import {defaults as defaultControls} from '../src/ol/control.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -14,7 +14,7 @@ var map = new Map({
new TileLayer({ new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}), }),
new _ol_layer_Vector_({ new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
import {defaults as defaultControls} from '../src/ol/control.js'; import {defaults as defaultControls} from '../src/ol/control.js';
import WKT from '../src/ol/format/WKT.js'; import WKT from '../src/ol/format/WKT.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -19,7 +19,7 @@ var feature = format.readFeature(
'-39.1552734375, 10.689697265625 -25.0927734375))'); '-39.1552734375, 10.689697265625 -25.0927734375))');
feature.getGeometry().transform('EPSG:4326', 'EPSG:3857'); feature.getGeometry().transform('EPSG:4326', 'EPSG:3857');
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}) })

View File

@@ -4,7 +4,7 @@ import _ol_events_condition_ from '../src/ol/events/condition.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_Extent_ from '../src/ol/interaction/Extent.js'; import _ol_interaction_Extent_ from '../src/ol/interaction/Extent.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -18,7 +18,7 @@ var map = new Map({
new TileLayer({ new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}), }),
new _ol_layer_Vector_({ new VectorLayer({
source: vectorSource source: vectorSource
}) })
], ],

View File

@@ -6,7 +6,7 @@ import {defaults as defaultControls} from '../src/ol/control.js';
import {easeOut} from '../src/ol/easing.js'; import {easeOut} from '../src/ol/easing.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -38,7 +38,7 @@ var map = new Map({
var source = new _ol_source_Vector_({ var source = new _ol_source_Vector_({
wrapX: false wrapX: false
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source source: source
}); });
map.addLayer(vector); map.addLayer(vector);

View File

@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
import Polyline from '../src/ol/format/Polyline.js'; import Polyline from '../src/ol/format/Polyline.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -113,7 +113,7 @@ var speed, now;
var speedInput = document.getElementById('speed'); var speedInput = document.getElementById('speed');
var startButton = document.getElementById('start-animation'); var startButton = document.getElementById('start-animation');
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [routeFeature, geoMarker, startMarker, endMarker] features: [routeFeature, geoMarker, startMarker, endMarker]
}), }),

View File

@@ -4,7 +4,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import LineString from '../src/ol/geom/LineString.js'; import LineString from '../src/ol/geom/LineString.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
@@ -109,7 +109,7 @@ flightsSource = new _ol_source_Vector_({
} }
}); });
var flightsLayer = new _ol_layer_Vector_({ var flightsLayer = new VectorLayer({
source: flightsSource, source: flightsSource,
style: function(feature) { style: function(feature) {
// if the animation is still active for a feature, do not // if the animation is still active for a feature, do not

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import LineString from '../src/ol/geom/LineString.js'; import LineString from '../src/ol/geom/LineString.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var radius = 10e6; var radius = 10e6;
@@ -17,7 +17,7 @@ var triangle = new LineString([
var feature = new Feature(triangle); var feature = new Feature(triangle);
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}) })

View File

@@ -5,7 +5,7 @@ import {defaults as defaultControls} from '../src/ol/control.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import Circle from '../src/ol/geom/Circle.js'; import Circle from '../src/ol/geom/Circle.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -166,7 +166,7 @@ var vectorSource = new _ol_source_Vector_({
vectorSource.addFeature(new Feature(new Circle([5e6, 7e6], 1e6))); vectorSource.addFeature(new Feature(new Circle([5e6, 7e6], 1e6)));
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource, source: vectorSource,
style: styleFunction style: styleFunction
}); });

View File

@@ -5,7 +5,7 @@ import View from '../src/ol/View.js';
import {defaults as defaultControls} from '../src/ol/control.js'; import {defaults as defaultControls} from '../src/ol/control.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -86,7 +86,7 @@ geolocation.on('change:position', function() {
new Point(coordinates) : null); new Point(coordinates) : null);
}); });
new _ol_layer_Vector_({ new VectorLayer({
map: map, map: map,
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [accuracyFeature, positionFeature] features: [accuracyFeature, positionFeature]

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GPX from '../src/ol/format/GPX.js'; import GPX from '../src/ol/format/GPX.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -44,7 +44,7 @@ var style = {
}) })
}; };
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/gpx/fells_loop.gpx', url: 'data/gpx/fells_loop.gpx',
format: new GPX() format: new GPX()

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import Feature from '../src/ol/Feature.js'; import Feature from '../src/ol/Feature.js';
@@ -22,7 +22,7 @@ var style = new _ol_style_Style_({
var feature = new Feature(new LineString([[-4000000, 0], [4000000, 0]])); var feature = new Feature(new LineString([[-4000000, 0], [4000000, 0]]));
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}), }),

View File

@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -52,7 +52,7 @@ var vectorSource = new _ol_source_Vector_({
features: [rome, london, madrid] features: [rome, london, madrid]
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
@@ -31,7 +31,7 @@ var map = new Map({
new TileLayer({ new TileLayer({
source: new _ol_source_Stamen_({layer: 'watercolor'}) source: new _ol_source_Stamen_({layer: 'watercolor'})
}), }),
new _ol_layer_Vector_({ new VectorLayer({
style: function(feature) { style: function(feature) {
return feature.get('style'); return feature.get('style');
}, },

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
import _ol_style_Style_ from '../src/ol/style/Style.js'; import _ol_style_Style_ from '../src/ol/style/Style.js';
@@ -75,7 +75,7 @@ for (i = 0; i < featureCount; ++i) {
var vectorSource = new _ol_source_Vector_({ var vectorSource = new _ol_source_Vector_({
features: features features: features
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource source: vectorSource
}); });
@@ -96,7 +96,7 @@ for (i = 0; i < featureCount; i += 30) {
overlayFeatures.push(clone); overlayFeatures.push(clone);
} }
new _ol_layer_Vector_({ new VectorLayer({
map: map, map: map,
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: overlayFeatures features: overlayFeatures

View File

@@ -4,7 +4,7 @@ import _ol_Overlay_ from '../src/ol/Overlay.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
@@ -33,7 +33,7 @@ var vectorSource = new _ol_source_Vector_({
features: [iconFeature] features: [iconFeature]
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -6,7 +6,7 @@ import IGC from '../src/ol/format/IGC.js';
import LineString from '../src/ol/geom/LineString.js'; 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 TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -92,7 +92,7 @@ var map = new Map({
'?apikey=0e6fc415256d4fbb9b5166a718591d71' '?apikey=0e6fc415256d4fbb9b5166a718591d71'
}) })
}), }),
new _ol_layer_Vector_({ new VectorLayer({
source: vectorSource, source: vectorSource,
style: styleFunction style: styleFunction
}) })
@@ -175,7 +175,7 @@ map.on('postcompose', function(evt) {
} }
}); });
var featureOverlay = new _ol_layer_Vector_({ var featureOverlay = new VectorLayer({
source: new _ol_source_Vector_(), source: new _ol_source_Vector_(),
map: map, map: map,
style: new _ol_style_Style_({ style: new _ol_style_Style_({

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
@@ -22,7 +22,7 @@ var style = new _ol_style_Style_({
var map = new Map({ var map = new Map({
layers: [ layers: [
new _ol_layer_Vector_({ new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
@@ -41,7 +41,7 @@ var map = new Map({
}) })
}); });
var featureOverlay = new _ol_layer_Vector_({ var featureOverlay = new VectorLayer({
source: new _ol_source_Vector_(), source: new _ol_source_Vector_(),
map: map, map: map,
style: new _ol_style_Style_({ style: new _ol_style_Style_({

View File

@@ -4,7 +4,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -33,7 +33,7 @@ fetch('data/geojson/roads-seoul.geojson').then(function(response) {
source.addFeatures(features); source.addFeatures(features);
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: source source: source
}); });

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import KML from '../src/ol/format/KML.js'; import KML from '../src/ol/format/KML.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -38,7 +38,7 @@ var styleFunction = function(feature) {
return style; return style;
}; };
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/kml/2012_Earthquakes_Mag5.kml', url: 'data/kml/2012_Earthquakes_Mag5.kml',
format: new KML({ format: new KML({

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import KML from '../src/ol/format/KML.js'; import KML from '../src/ol/format/KML.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js'; import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -45,7 +45,7 @@ var styleFunction = function(feature) {
}); });
}; };
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/kml/timezones.kml', url: 'data/kml/timezones.kml',
format: new KML({ format: new KML({

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import KML from '../src/ol/format/KML.js'; import KML from '../src/ol/format/KML.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -13,7 +13,7 @@ var raster = new TileLayer({
}) })
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/kml/2012-02-10.kml', url: 'data/kml/2012-02-10.kml',
format: new KML() format: new KML()

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
@@ -53,7 +53,7 @@ function createLayer(coordinates, style, zIndex) {
features: [feature] features: [feature]
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: source source: source
}); });
vectorLayer.setZIndex(zIndex); vectorLayer.setZIndex(zIndex);

View File

@@ -3,7 +3,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 Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Icon_ from '../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../src/ol/style/Icon.js';
@@ -46,7 +46,7 @@ var styleFunction = function(feature) {
return styles; return styles;
}; };
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source, source: source,
style: styleFunction style: styleFunction
}); });

View File

@@ -7,7 +7,7 @@ import LineString from '../src/ol/geom/LineString.js';
import Polygon from '../src/ol/geom/Polygon.js'; import Polygon from '../src/ol/geom/Polygon.js';
import Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -22,7 +22,7 @@ var raster = new TileLayer({
var source = new _ol_source_Vector_(); var source = new _ol_source_Vector_();
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
fill: new _ol_style_Fill_({ fill: new _ol_style_Fill_({

View File

@@ -5,7 +5,7 @@ import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -14,7 +14,7 @@ var raster = new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON(), format: new GeoJSON(),

View File

@@ -4,7 +4,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
import {defaults as defaultInteractions} from '../src/ol/interaction.js'; import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -148,7 +148,7 @@ var source = new _ol_source_Vector_({
features: (new GeoJSON()).readFeatures(geojsonObject) features: (new GeoJSON()).readFeatures(geojsonObject)
}); });
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source, source: source,
style: styleFunction style: styleFunction
}); });

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; 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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -84,7 +84,7 @@ var source = new _ol_source_Vector_({
features: (new GeoJSON()).readFeatures(geojsonObject) features: (new GeoJSON()).readFeatures(geojsonObject)
}); });
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source, source: source,
style: styles style: styles
}); });

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
@@ -80,7 +80,7 @@ var source = new _ol_source_Vector_({
features: features features: features
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: source source: source
}); });

View File

@@ -4,7 +4,7 @@ import _ol_events_condition_ from '../src/ol/events/condition.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -12,7 +12,7 @@ var raster = new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -5,7 +5,7 @@ import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js'; import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -17,7 +17,7 @@ var raster = new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_(), source: new _ol_source_Vector_(),
style: new _ol_style_Style_({ style: new _ol_style_Style_({
fill: new _ol_style_Fill_({ fill: new _ol_style_Fill_({

View File

@@ -2,7 +2,7 @@ import Graticule from '../src/ol/Graticule.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js'; import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import {register} from '../src/ol/proj/proj4.js'; import {register} from '../src/ol/proj/proj4.js';
@@ -25,7 +25,7 @@ var sphereMollweideProjection = new _ol_proj_Projection_({
var map = new Map({ var map = new Map({
keyboardEventTarget: document, keyboardEventTarget: document,
layers: [ layers: [
new _ol_layer_Vector_({ new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries-110m.geojson', url: 'data/geojson/countries-110m.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js'; import * as _ol_extent_ from '../src/ol/extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -27,7 +27,7 @@ var map = new Map({
key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5', key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5',
imagerySet: 'Aerial' imagerySet: 'Aerial'
}) })
}), new _ol_layer_Vector_({ }), new VectorLayer({
declutter: true, declutter: true,
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
format: new GeoJSON(), format: new GeoJSON(),

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_AtlasManager_ from '../src/ol/style/AtlasManager.js'; import _ol_style_AtlasManager_ from '../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -102,7 +102,7 @@ for (i = 0; i < featureCount; ++i) {
var vectorSource = new _ol_source_Vector_({ var vectorSource = new _ol_source_Vector_({
features: features features: features
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -2,7 +2,7 @@ import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import LineString from '../src/ol/geom/LineString.js'; import LineString from '../src/ol/geom/LineString.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import _ol_style_Style_ from '../src/ol/style/Style.js'; import _ol_style_Style_ from '../src/ol/style/Style.js';
@@ -36,7 +36,7 @@ for (i = 0; i < count; ++i) {
startPoint = endPoint; startPoint = endPoint;
} }
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: features, features: features,
wrapX: false wrapX: false

View File

@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import LineString from '../src/ol/geom/LineString.js'; 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 _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -44,7 +44,7 @@ var vectorSource = new _ol_source_Vector_({
features: features, features: features,
wrapX: false wrapX: false
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource, source: vectorSource,
style: function(feature) { style: function(feature) {
return styles[feature.get('size')]; return styles[feature.get('size')];

View File

@@ -3,15 +3,15 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {circular as circularPolygon} from '../src/ol/geom/Polygon.js'; import {circular as circularPolygon} from '../src/ol/geom/Polygon.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js'; import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var vectorLayer4326 = new _ol_layer_Vector_({ var vectorLayer4326 = new VectorLayer({
source: new _ol_source_Vector_() source: new _ol_source_Vector_()
}); });
var vectorLayer3857 = new _ol_layer_Vector_({ var vectorLayer3857 = new VectorLayer({
source: new _ol_source_Vector_() source: new _ol_source_Vector_()
}); });

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import TopoJSON from '../src/ol/format/TopoJSON.js'; import TopoJSON from '../src/ol/format/TopoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js'; import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -26,7 +26,7 @@ var style = new _ol_style_Style_({
}) })
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/topojson/world-110m.json', url: 'data/topojson/world-110m.json',
format: new TopoJSON({ format: new TopoJSON({

View File

@@ -10,7 +10,7 @@ import Polygon from '../src/ol/geom/Polygon.js';
import Draw from '../src/ol/interaction/Draw.js'; import Draw from '../src/ol/interaction/Draw.js';
import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js'; import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Style_ from '../src/ol/style/Style.js'; import _ol_style_Style_ from '../src/ol/style/Style.js';
@@ -25,7 +25,7 @@ var raster = new TileLayer({
}); });
var nodes = new _ol_source_Vector_({wrapX: false}); var nodes = new _ol_source_Vector_({wrapX: false});
var nodesLayer = new _ol_layer_Vector_({ var nodesLayer = new VectorLayer({
source: nodes, source: nodes,
style: function(f) { style: function(f) {
var style = new _ol_style_Style_({ var style = new _ol_style_Style_({
@@ -48,7 +48,7 @@ var nodesLayer = new _ol_layer_Vector_({
}); });
var edges = new _ol_source_Vector_({wrapX: false}); var edges = new _ol_source_Vector_({wrapX: false});
var edgesLayer = new _ol_layer_Vector_({ var edgesLayer = new VectorLayer({
source: edges, source: edges,
style: function(f) { style: function(f) {
var style = new _ol_style_Style_({ var style = new _ol_style_Style_({
@@ -70,7 +70,7 @@ var edgesLayer = new _ol_layer_Vector_({
}); });
var faces = new _ol_source_Vector_({wrapX: false}); var faces = new _ol_source_Vector_({wrapX: false});
var facesLayer = new _ol_layer_Vector_({ var facesLayer = new VectorLayer({
source: faces, source: faces,
style: function(f) { style: function(f) {
var style = new _ol_style_Style_({ var style = new _ol_style_Style_({

View File

@@ -5,7 +5,7 @@ import {defaults as defaultInteractions} from '../src/ol/interaction.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_interaction_Translate_ from '../src/ol/interaction/Translate.js'; import _ol_interaction_Translate_ from '../src/ol/interaction/Translate.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -14,7 +14,7 @@ var raster = new TileLayer({
source: new _ol_source_OSM_() source: new _ol_source_OSM_()
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -4,7 +4,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -38,7 +38,7 @@ fetch('data/geojson/roads-seoul.geojson').then(function(response) {
street.getGeometry().transform('EPSG:4326', 'EPSG:3857'); street.getGeometry().transform('EPSG:4326', 'EPSG:3857');
source.addFeature(street); source.addFeature(street);
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: source source: source
}); });

View File

@@ -6,7 +6,7 @@ import Draw from '../src/ol/interaction/Draw.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js'; import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -49,7 +49,7 @@ var vectorSource = new _ol_source_Vector_({
})) }))
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import EsriJSON from '../src/ol/format/EsriJSON.js'; import EsriJSON from '../src/ol/format/EsriJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -87,7 +87,7 @@ var vectorSource = new _ol_source_Vector_({
})) }))
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource, source: vectorSource,
style: function(feature) { style: function(feature) {
var classify = feature.get('activeprod'); var classify = feature.get('activeprod');

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js'; import * as _ol_extent_ from '../src/ol/extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
@@ -58,7 +58,7 @@ var countryStyle = new _ol_style_Style_({
}); });
var style = [countryStyle, labelStyle]; var style = [countryStyle, labelStyle];
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../src/ol/style/Circle.js';
@@ -140,7 +140,7 @@ function polygonStyleFunction(feature, resolution) {
}); });
} }
var vectorPolygons = new _ol_layer_Vector_({ var vectorPolygons = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/polygon-samples.geojson', url: 'data/geojson/polygon-samples.geojson',
format: new GeoJSON() format: new GeoJSON()
@@ -160,7 +160,7 @@ function lineStyleFunction(feature, resolution) {
}); });
} }
var vectorLines = new _ol_layer_Vector_({ var vectorLines = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/line-samples.geojson', url: 'data/geojson/line-samples.geojson',
format: new GeoJSON() format: new GeoJSON()
@@ -181,7 +181,7 @@ function pointStyleFunction(feature, resolution) {
}); });
} }
var vectorPoints = new _ol_layer_Vector_({ var vectorPoints = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/point-samples.geojson', url: 'data/geojson/point-samples.geojson',
format: new GeoJSON() format: new GeoJSON()

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
@@ -29,7 +29,7 @@ var style = new _ol_style_Style_({
}) })
}); });
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson', url: 'data/geojson/countries.geojson',
format: new GeoJSON() format: new GeoJSON()
@@ -69,7 +69,7 @@ var highlightStyle = new _ol_style_Style_({
}) })
}); });
var featureOverlay = new _ol_layer_Vector_({ var featureOverlay = new VectorLayer({
source: new _ol_source_Vector_(), source: new _ol_source_Vector_(),
map: map, map: map,
style: function(feature) { style: function(feature) {

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import {defaults as defaultControls} from '../src/ol/control.js'; import {defaults as defaultControls} from '../src/ol/control.js';
import OSMXML from '../src/ol/format/OSMXML.js'; import OSMXML from '../src/ol/format/OSMXML.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {transformExtent} from '../src/ol/proj.js'; import {transformExtent} from '../src/ol/proj.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
@@ -98,7 +98,7 @@ var vectorSource = new _ol_source_Vector_({
strategy: _ol_loadingstrategy_.bbox strategy: _ol_loadingstrategy_.bbox
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource, source: vectorSource,
style: function(feature) { style: function(feature) {
for (var key in styles) { for (var key in styles) {

View File

@@ -4,7 +4,7 @@ import _ol_format_filter_ from '../src/ol/format/filter.js';
import WFS from '../src/ol/format/WFS.js'; import WFS from '../src/ol/format/WFS.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
@@ -12,7 +12,7 @@ import _ol_style_Style_ from '../src/ol/style/Style.js';
var vectorSource = new _ol_source_Vector_(); var vectorSource = new _ol_source_Vector_();
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource, source: vectorSource,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js'; import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -22,7 +22,7 @@ var vectorSource = new _ol_source_Vector_({
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: vectorSource, source: vectorSource,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({

View File

@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import WKT from '../src/ol/format/WKT.js'; import WKT from '../src/ol/format/WKT.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js'; import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js'; import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -21,7 +21,7 @@ var feature = format.readFeature(wkt, {
featureProjection: 'EPSG:3857' featureProjection: 'EPSG:3857'
}); });
var vector = new _ol_layer_Vector_({ var vector = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}) })

View File

@@ -22,7 +22,7 @@ import Polygon, {fromCircle, makeRegular} from '../geom/Polygon.js';
import DrawEventType from '../interaction/DrawEventType.js'; import DrawEventType from '../interaction/DrawEventType.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_interaction_Property_ from '../interaction/Property.js'; import _ol_interaction_Property_ from '../interaction/Property.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import _ol_source_Vector_ from '../source/Vector.js'; import _ol_source_Vector_ from '../source/Vector.js';
import _ol_style_Style_ from '../style/Style.js'; import _ol_style_Style_ from '../style/Style.js';
@@ -249,7 +249,7 @@ var Draw = function(options) {
* @type {ol.layer.Vector} * @type {ol.layer.Vector}
* @private * @private
*/ */
this.overlay_ = new _ol_layer_Vector_({ this.overlay_ = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
useSpatialIndex: false, useSpatialIndex: false,
wrapX: options.wrapX ? options.wrapX : false wrapX: options.wrapX ? options.wrapX : false

View File

@@ -13,7 +13,7 @@ import Point from '../geom/Point.js';
import {fromExtent as polygonFromExtent} from '../geom/Polygon.js'; import {fromExtent as polygonFromExtent} from '../geom/Polygon.js';
import _ol_interaction_ExtentEventType_ from '../interaction/ExtentEventType.js'; import _ol_interaction_ExtentEventType_ from '../interaction/ExtentEventType.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import _ol_source_Vector_ from '../source/Vector.js'; import _ol_source_Vector_ from '../source/Vector.js';
import _ol_style_Style_ from '../style/Style.js'; import _ol_style_Style_ from '../style/Style.js';
@@ -93,7 +93,7 @@ var _ol_interaction_Extent_ = function(opt_options) {
* @type {ol.layer.Vector} * @type {ol.layer.Vector}
* @private * @private
*/ */
this.extentOverlay_ = new _ol_layer_Vector_({ this.extentOverlay_ = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
useSpatialIndex: false, useSpatialIndex: false,
wrapX: !!opt_options.wrapX wrapX: !!opt_options.wrapX
@@ -108,7 +108,7 @@ var _ol_interaction_Extent_ = function(opt_options) {
* @type {ol.layer.Vector} * @type {ol.layer.Vector}
* @private * @private
*/ */
this.vertexOverlay_ = new _ol_layer_Vector_({ this.vertexOverlay_ = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
useSpatialIndex: false, useSpatialIndex: false,
wrapX: !!opt_options.wrapX wrapX: !!opt_options.wrapX

View File

@@ -18,7 +18,7 @@ import GeometryType from '../geom/GeometryType.js';
import Point from '../geom/Point.js'; import Point from '../geom/Point.js';
import _ol_interaction_ModifyEventType_ from '../interaction/ModifyEventType.js'; import _ol_interaction_ModifyEventType_ from '../interaction/ModifyEventType.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import _ol_source_Vector_ from '../source/Vector.js'; import _ol_source_Vector_ from '../source/Vector.js';
import VectorEventType from '../source/VectorEventType.js'; import VectorEventType from '../source/VectorEventType.js';
import RBush from '../structs/RBush.js'; import RBush from '../structs/RBush.js';
@@ -157,7 +157,7 @@ var _ol_interaction_Modify_ = function(options) {
* @type {ol.layer.Vector} * @type {ol.layer.Vector}
* @private * @private
*/ */
this.overlay_ = new _ol_layer_Vector_({ this.overlay_ = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
useSpatialIndex: false, useSpatialIndex: false,
wrapX: !!options.wrapX wrapX: !!options.wrapX

View File

@@ -10,7 +10,7 @@ import _ol_events_condition_ from '../events/condition.js';
import {TRUE} from '../functions.js'; import {TRUE} from '../functions.js';
import GeometryType from '../geom/GeometryType.js'; import GeometryType from '../geom/GeometryType.js';
import Interaction from '../interaction/Interaction.js'; import Interaction from '../interaction/Interaction.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import _ol_obj_ from '../obj.js'; import _ol_obj_ from '../obj.js';
import _ol_source_Vector_ from '../source/Vector.js'; import _ol_source_Vector_ from '../source/Vector.js';
import _ol_style_Style_ from '../style/Style.js'; import _ol_style_Style_ from '../style/Style.js';
@@ -87,7 +87,7 @@ var _ol_interaction_Select_ = function(opt_options) {
*/ */
this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0; this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
var featureOverlay = new _ol_layer_Vector_({ var featureOverlay = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
useSpatialIndex: false, useSpatialIndex: false,
features: options.features, features: options.features,

View File

@@ -5,7 +5,7 @@ import _ol_events_ from '../events.js';
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import BaseObject from '../Object.js'; import BaseObject from '../Object.js';
import {createCanvasContext2D} from '../dom.js'; import {createCanvasContext2D} from '../dom.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import {clamp} from '../math.js'; import {clamp} from '../math.js';
import _ol_obj_ from '../obj.js'; import _ol_obj_ from '../obj.js';
import RenderEventType from '../render/EventType.js'; import RenderEventType from '../render/EventType.js';
@@ -54,7 +54,7 @@ var Heatmap = function(opt_options) {
delete baseOptions.blur; delete baseOptions.blur;
delete baseOptions.shadow; delete baseOptions.shadow;
delete baseOptions.weight; delete baseOptions.weight;
_ol_layer_Vector_.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions)); VectorLayer.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions));
/** /**
* @private * @private
@@ -136,7 +136,7 @@ var Heatmap = function(opt_options) {
_ol_events_.listen(this, RenderEventType.RENDER, this.handleRender_, this); _ol_events_.listen(this, RenderEventType.RENDER, this.handleRender_, this);
}; };
inherits(Heatmap, _ol_layer_Vector_); inherits(Heatmap, VectorLayer);
/** /**

View File

@@ -31,7 +31,7 @@ var Property = {
* @param {olx.layer.VectorOptions=} opt_options Options. * @param {olx.layer.VectorOptions=} opt_options Options.
* @api * @api
*/ */
var _ol_layer_Vector_ = function(opt_options) { var VectorLayer = function(opt_options) {
var options = opt_options ? var options = opt_options ?
opt_options : /** @type {olx.layer.VectorOptions} */ ({}); opt_options : /** @type {olx.layer.VectorOptions} */ ({});
@@ -101,13 +101,13 @@ var _ol_layer_Vector_ = function(opt_options) {
}; };
inherits(_ol_layer_Vector_, _ol_layer_Layer_); inherits(VectorLayer, _ol_layer_Layer_);
/** /**
* @return {boolean} Declutter. * @return {boolean} Declutter.
*/ */
_ol_layer_Vector_.prototype.getDeclutter = function() { VectorLayer.prototype.getDeclutter = function() {
return this.declutter_; return this.declutter_;
}; };
@@ -115,7 +115,7 @@ _ol_layer_Vector_.prototype.getDeclutter = function() {
/** /**
* @param {boolean} declutter Declutter. * @param {boolean} declutter Declutter.
*/ */
_ol_layer_Vector_.prototype.setDeclutter = function(declutter) { VectorLayer.prototype.setDeclutter = function(declutter) {
this.declutter_ = declutter; this.declutter_ = declutter;
}; };
@@ -123,7 +123,7 @@ _ol_layer_Vector_.prototype.setDeclutter = function(declutter) {
/** /**
* @return {number|undefined} Render buffer. * @return {number|undefined} Render buffer.
*/ */
_ol_layer_Vector_.prototype.getRenderBuffer = function() { VectorLayer.prototype.getRenderBuffer = function() {
return this.renderBuffer_; return this.renderBuffer_;
}; };
@@ -132,7 +132,7 @@ _ol_layer_Vector_.prototype.getRenderBuffer = function() {
* @return {function(ol.Feature, ol.Feature): number|null|undefined} Render * @return {function(ol.Feature, ol.Feature): number|null|undefined} Render
* order. * order.
*/ */
_ol_layer_Vector_.prototype.getRenderOrder = function() { VectorLayer.prototype.getRenderOrder = function() {
return (/** @type {ol.RenderOrderFunction|null|undefined} */ this.get(Property.RENDER_ORDER)); return (/** @type {ol.RenderOrderFunction|null|undefined} */ this.get(Property.RENDER_ORDER));
}; };
@@ -143,7 +143,7 @@ _ol_layer_Vector_.prototype.getRenderOrder = function() {
* @return {ol.source.Vector} Source. * @return {ol.source.Vector} Source.
* @api * @api
*/ */
_ol_layer_Vector_.prototype.getSource; VectorLayer.prototype.getSource;
/** /**
@@ -153,7 +153,7 @@ _ol_layer_Vector_.prototype.getSource;
* Layer style. * Layer style.
* @api * @api
*/ */
_ol_layer_Vector_.prototype.getStyle = function() { VectorLayer.prototype.getStyle = function() {
return this.style_; return this.style_;
}; };
@@ -163,7 +163,7 @@ _ol_layer_Vector_.prototype.getStyle = function() {
* @return {ol.StyleFunction|undefined} Layer style function. * @return {ol.StyleFunction|undefined} Layer style function.
* @api * @api
*/ */
_ol_layer_Vector_.prototype.getStyleFunction = function() { VectorLayer.prototype.getStyleFunction = function() {
return this.styleFunction_; return this.styleFunction_;
}; };
@@ -172,7 +172,7 @@ _ol_layer_Vector_.prototype.getStyleFunction = function() {
* @return {boolean} Whether the rendered layer should be updated while * @return {boolean} Whether the rendered layer should be updated while
* animating. * animating.
*/ */
_ol_layer_Vector_.prototype.getUpdateWhileAnimating = function() { VectorLayer.prototype.getUpdateWhileAnimating = function() {
return this.updateWhileAnimating_; return this.updateWhileAnimating_;
}; };
@@ -181,7 +181,7 @@ _ol_layer_Vector_.prototype.getUpdateWhileAnimating = function() {
* @return {boolean} Whether the rendered layer should be updated while * @return {boolean} Whether the rendered layer should be updated while
* interacting. * interacting.
*/ */
_ol_layer_Vector_.prototype.getUpdateWhileInteracting = function() { VectorLayer.prototype.getUpdateWhileInteracting = function() {
return this.updateWhileInteracting_; return this.updateWhileInteracting_;
}; };
@@ -190,7 +190,7 @@ _ol_layer_Vector_.prototype.getUpdateWhileInteracting = function() {
* @param {ol.RenderOrderFunction|null|undefined} renderOrder * @param {ol.RenderOrderFunction|null|undefined} renderOrder
* Render order. * Render order.
*/ */
_ol_layer_Vector_.prototype.setRenderOrder = function(renderOrder) { VectorLayer.prototype.setRenderOrder = function(renderOrder) {
this.set(Property.RENDER_ORDER, renderOrder); this.set(Property.RENDER_ORDER, renderOrder);
}; };
@@ -206,7 +206,7 @@ _ol_layer_Vector_.prototype.setRenderOrder = function(renderOrder) {
* style Layer style. * style Layer style.
* @api * @api
*/ */
_ol_layer_Vector_.prototype.setStyle = function(style) { VectorLayer.prototype.setStyle = function(style) {
this.style_ = style !== undefined ? style : _ol_style_Style_.defaultFunction; this.style_ = style !== undefined ? style : _ol_style_Style_.defaultFunction;
this.styleFunction_ = style === null ? this.styleFunction_ = style === null ?
undefined : _ol_style_Style_.createFunction(this.style_); undefined : _ol_style_Style_.createFunction(this.style_);
@@ -217,9 +217,9 @@ _ol_layer_Vector_.prototype.setStyle = function(style) {
/** /**
* @return {ol.layer.VectorRenderType|string} The render mode. * @return {ol.layer.VectorRenderType|string} The render mode.
*/ */
_ol_layer_Vector_.prototype.getRenderMode = function() { VectorLayer.prototype.getRenderMode = function() {
return this.renderMode_; return this.renderMode_;
}; };
export default _ol_layer_Vector_; export default VectorLayer;

View File

@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
import LayerType from '../LayerType.js'; import LayerType from '../LayerType.js';
import {assert} from '../asserts.js'; import {assert} from '../asserts.js';
import _ol_layer_TileProperty_ from '../layer/TileProperty.js'; import _ol_layer_TileProperty_ from '../layer/TileProperty.js';
import _ol_layer_Vector_ from '../layer/Vector.js'; import VectorLayer from '../layer/Vector.js';
import _ol_layer_VectorTileRenderType_ from '../layer/VectorTileRenderType.js'; import _ol_layer_VectorTileRenderType_ from '../layer/VectorTileRenderType.js';
import _ol_obj_ from '../obj.js'; import _ol_obj_ from '../obj.js';
@@ -39,7 +39,7 @@ var _ol_layer_VectorTile_ = function(opt_options) {
delete baseOptions.preload; delete baseOptions.preload;
delete baseOptions.useInterimTilesOnError; delete baseOptions.useInterimTilesOnError;
_ol_layer_Vector_.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions)); VectorLayer.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions));
this.setPreload(options.preload ? options.preload : 0); this.setPreload(options.preload ? options.preload : 0);
this.setUseInterimTilesOnError(options.useInterimTilesOnError ? this.setUseInterimTilesOnError(options.useInterimTilesOnError ?
@@ -54,7 +54,7 @@ var _ol_layer_VectorTile_ = function(opt_options) {
}; };
inherits(_ol_layer_VectorTile_, _ol_layer_Vector_); inherits(_ol_layer_VectorTile_, VectorLayer);
/** /**

View File

@@ -6,7 +6,7 @@ import Circle from '../../../../src/ol/geom/Circle.js';
import LineString from '../../../../src/ol/geom/LineString.js'; 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_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
@@ -90,7 +90,7 @@ describe('ol.rendering.layer.Vector', function() {
addCircle(500); addCircle(500);
addPolygon(600); addPolygon(600);
addPolygon(720); addPolygon(720);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: source source: source
})); }));
map.once('postrender', function() { map.once('postrender', function() {
@@ -116,7 +116,7 @@ describe('ol.rendering.layer.Vector', function() {
addCircle(500); addCircle(500);
addPolygon(600); addPolygon(600);
addPolygon(720); addPolygon(720);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
renerMode: 'image', renerMode: 'image',
source: source source: source
})); }));
@@ -155,7 +155,7 @@ describe('ol.rendering.layer.Vector', function() {
]); ]);
source.addFeature(smallLine2); source.addFeature(smallLine2);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: source, source: source,
opacity: 0.5 opacity: 0.5
})); }));
@@ -194,7 +194,7 @@ describe('ol.rendering.layer.Vector', function() {
]); ]);
source.addFeature(smallLine2); source.addFeature(smallLine2);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: source, source: source,
opacity: 0.5 opacity: 0.5
@@ -210,7 +210,7 @@ describe('ol.rendering.layer.Vector', function() {
map.getView().setRotation(Math.PI + Math.PI / 4); map.getView().setRotation(Math.PI + Math.PI / 4);
addPolygon(300); addPolygon(300);
addCircle(500); addCircle(500);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -230,7 +230,7 @@ describe('ol.rendering.layer.Vector', function() {
map.getView().setRotation(Math.PI + Math.PI / 4); map.getView().setRotation(Math.PI + Math.PI / 4);
addPolygon(300); addPolygon(300);
addCircle(500); addCircle(500);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
@@ -251,7 +251,7 @@ describe('ol.rendering.layer.Vector', function() {
addCircle(500); addCircle(500);
addPolygon(300); addPolygon(300);
map.skipFeature(source.getFeatures()[1]); map.skipFeature(source.getFeatures()[1]);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
@@ -283,7 +283,7 @@ describe('ol.rendering.layer.Vector', function() {
addCircle(500); addCircle(500);
addPolygon(600); addPolygon(600);
addPolygon(720); addPolygon(720);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -307,7 +307,7 @@ describe('ol.rendering.layer.Vector', function() {
addLineString(250); addLineString(250);
addLineString(600); addLineString(600);
addLineString(720); addLineString(720);
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
source: source, source: source,
style: new _ol_style_Style_({ style: new _ol_style_Style_({
stroke: new _ol_style_Stroke_({ stroke: new _ol_style_Stroke_({
@@ -346,7 +346,7 @@ describe('ol.rendering.layer.Vector', function() {
} }
return color; return color;
} }
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: createSource(true), source: createSource(true),
style: function(feature) { style: function(feature) {
alternateColor(); alternateColor();
@@ -397,7 +397,7 @@ describe('ol.rendering.layer.Vector', function() {
} }
return color; return color;
} }
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: createSource(true), source: createSource(true),
style: function(feature) { style: function(feature) {
alternateColor(); alternateColor();
@@ -466,7 +466,7 @@ describe('ol.rendering.layer.Vector', function() {
var format = new GeoJSON({featureProjection: 'EPSG:3857'}); var format = new GeoJSON({featureProjection: 'EPSG:3857'});
var feature = format.readFeature(json); var feature = format.readFeature(json);
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}), }),
@@ -510,7 +510,7 @@ describe('ol.rendering.layer.Vector', function() {
]])) ]]))
] ]
}); });
layer = new _ol_layer_Vector_({ layer = new VectorLayer({
renderBuffer: 0, renderBuffer: 0,
source: src source: src
}); });
@@ -584,7 +584,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text', function(done) { it('declutters text', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -624,7 +624,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text with renderMode: \'image\'', function(done) { it('declutters text with renderMode: \'image\'', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: source source: source
}); });
@@ -665,7 +665,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text and respects z-index', function(done) { it('declutters text and respects z-index', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -705,7 +705,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters images', function(done) { it('declutters images', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -744,7 +744,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters images with renderMode: \'image\'', function(done) { it('declutters images with renderMode: \'image\'', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
renderMode: 'image', renderMode: 'image',
source: source source: source
}); });
@@ -784,7 +784,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters images and respects z-index', function(done) { it('declutters images and respects z-index', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -823,7 +823,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters image & text groups', function(done) { it('declutters image & text groups', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -867,7 +867,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text along lines and images', function(done) { it('declutters text along lines and images', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -910,7 +910,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text along lines and images with renderMode: \'image\'', function(done) { it('declutters text along lines and images with renderMode: \'image\'', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);
@@ -953,7 +953,7 @@ describe('ol.rendering.layer.Vector', function() {
it('declutters text along lines and images with z-index', function(done) { it('declutters text along lines and images with z-index', function(done) {
createMap('canvas'); createMap('canvas');
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });
map.addLayer(layer); map.addLayer(layer);

View File

@@ -3,7 +3,7 @@ import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import MVT from '../../../../src/ol/format/MVT.js'; import MVT from '../../../../src/ol/format/MVT.js';
import Point from '../../../../src/ol/geom/Point.js'; import Point from '../../../../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js'; import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
import _ol_obj_ from '../../../../src/ol/obj.js'; import _ol_obj_ from '../../../../src/ol/obj.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -101,7 +101,7 @@ describe('ol.rendering.layer.VectorTile', function() {
new Feature(new Point([1825727.7316762917, 6143091.089223046])) new Feature(new Point([1825727.7316762917, 6143091.089223046]))
] ]
}); });
map.addLayer(new _ol_layer_Vector_({ map.addLayer(new VectorLayer({
zIndex: 1, zIndex: 1,
source: vectorSource, source: vectorSource,
style: new _ol_style_Style_({ style: new _ol_style_Style_({

View File

@@ -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 Map from '../../../src/ol/Map.js'; import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js'; import View from '../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../src/ol/source/Vector.js';
@@ -10,7 +10,7 @@ describe('ol.rendering.Map', function() {
var map; var map;
function createMap(renderer) { function createMap(renderer) {
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [new Feature({ features: [new Feature({
geometry: new Point([0, 0]) geometry: new Point([0, 0])

View File

@@ -3,7 +3,7 @@ import Point from '../../../../src/ol/geom/Point.js';
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js'; import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
@@ -17,7 +17,7 @@ describe('ol.rendering.style.Circle', function() {
function createMap(renderer) { function createMap(renderer) {
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -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 Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js'; import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js';
import _ol_style_Style_ from '../../../../src/ol/style/Style.js'; import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
@@ -23,7 +23,7 @@ describe('ol.rendering.style.Icon', function() {
function createMap(renderer, width, height) { function createMap(renderer, width, height) {
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js';
import LineString from '../../../../src/ol/geom/LineString.js'; import LineString from '../../../../src/ol/geom/LineString.js';
import Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Style_ from '../../../../src/ol/style/Style.js'; import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js'; import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -14,7 +14,7 @@ describe('ol.rendering.style.LineString', function() {
function createMap(renderer, opt_pixelRatio) { function createMap(renderer, opt_pixelRatio) {
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js';
import Polygon from '../../../../src/ol/geom/Polygon.js'; import Polygon from '../../../../src/ol/geom/Polygon.js';
import Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import _ol_style_Style_ from '../../../../src/ol/style/Style.js'; import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
@@ -17,7 +17,7 @@ describe('ol.rendering.style.Polygon', function() {
var size = opt_size || 50; var size = opt_size || 50;
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -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 Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js'; import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js';
@@ -16,7 +16,7 @@ describe('ol.rendering.style.RegularShape', function() {
function createMap(renderer) { function createMap(renderer) {
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -6,7 +6,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 Map from '../../../../src/ol/Map.js'; import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js'; import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js'; import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
@@ -20,7 +20,7 @@ describe('ol.rendering.style.Text', function() {
function createMap(renderer, opt_pixelRatio) { function createMap(renderer, opt_pixelRatio) {
var pixelRatio = opt_pixelRatio || 1; var pixelRatio = opt_pixelRatio || 1;
vectorSource = new _ol_source_Vector_(); vectorSource = new _ol_source_Vector_();
var vectorLayer = new _ol_layer_Vector_({ var vectorLayer = new VectorLayer({
source: vectorSource source: vectorSource
}); });

View File

@@ -3,7 +3,7 @@ import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js
import View from '../../../../src/ol/View.js'; import View from '../../../../src/ol/View.js';
import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js'; import DragRotateAndZoom from '../../../../src/ol/interaction/DragRotateAndZoom.js';
import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -35,7 +35,7 @@ describe('ol.interaction.DragRotateAndZoom', function() {
style.height = height + 'px'; style.height = height + 'px';
document.body.appendChild(target); document.body.appendChild(target);
var source = new _ol_source_Vector_(); var source = new _ol_source_Vector_();
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
interaction = new DragRotateAndZoom(); interaction = new DragRotateAndZoom();
map = new Map({ map = new Map({
target: target, target: target,

View File

@@ -3,7 +3,7 @@ import View from '../../../../src/ol/View.js';
import * as _ol_extent_ from '../../../../src/ol/extent.js'; import * as _ol_extent_ from '../../../../src/ol/extent.js';
import {fromExtent as polygonFromExtent} from '../../../../src/ol/geom/Polygon.js'; import {fromExtent as polygonFromExtent} from '../../../../src/ol/geom/Polygon.js';
import DragZoom from '../../../../src/ol/interaction/DragZoom.js'; import DragZoom from '../../../../src/ol/interaction/DragZoom.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_render_Box_ from '../../../../src/ol/render/Box.js'; import _ol_render_Box_ from '../../../../src/ol/render/Box.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -25,7 +25,7 @@ describe('ol.interaction.DragZoom', function() {
style.height = height + 'px'; style.height = height + 'px';
document.body.appendChild(target); document.body.appendChild(target);
source = new _ol_source_Vector_(); source = new _ol_source_Vector_();
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
map = new Map({ map = new Map({
target: target, target: target,
layers: [layer], layers: [layer],

View File

@@ -14,7 +14,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 Draw from '../../../../src/ol/interaction/Draw.js'; import Draw from '../../../../src/ol/interaction/Draw.js';
import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -35,7 +35,7 @@ describe('ol.interaction.Draw', function() {
style.height = height + 'px'; style.height = height + 'px';
document.body.appendChild(target); document.body.appendChild(target);
source = new _ol_source_Vector_(); source = new _ol_source_Vector_();
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
map = new Map({ map = new Map({
target: target, target: target,
layers: [layer], layers: [layer],

View File

@@ -10,7 +10,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_interaction_Modify_ from '../../../../src/ol/interaction/Modify.js'; import _ol_interaction_Modify_ from '../../../../src/ol/interaction/Modify.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -45,7 +45,7 @@ describe('ol.interaction.Modify', function() {
features: features features: features
}); });
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
map = new Map({ map = new Map({
target: target, target: target,

View File

@@ -7,7 +7,7 @@ import View from '../../../../src/ol/View.js';
import Polygon from '../../../../src/ol/geom/Polygon.js'; import Polygon from '../../../../src/ol/geom/Polygon.js';
import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js';
import _ol_interaction_Select_ from '../../../../src/ol/interaction/Select.js'; import _ol_interaction_Select_ from '../../../../src/ol/interaction/Select.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -57,7 +57,7 @@ describe('ol.interaction.Select', function() {
features: features features: features
}); });
layer = new _ol_layer_Vector_({source: source}); layer = new VectorLayer({source: source});
map = new Map({ map = new Map({
target: target, target: target,
@@ -357,7 +357,7 @@ describe('ol.interaction.Select', function() {
var layer_ = interaction.getLayer(feature); var layer_ = interaction.getLayer(feature);
expect(e.selected).to.have.length(1); expect(e.selected).to.have.length(1);
expect(feature).to.be.a(Feature); expect(feature).to.be.a(Feature);
expect(layer_).to.be.a(_ol_layer_Vector_); expect(layer_).to.be.a(VectorLayer);
expect(layer_).to.equal(layer); expect(layer_).to.equal(layer);
}); });
interaction.on('select', listenerSpy); interaction.on('select', listenerSpy);

View File

@@ -6,7 +6,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 _ol_interaction_Translate_ from '../../../../src/ol/interaction/Translate.js'; import _ol_interaction_Translate_ from '../../../../src/ol/interaction/Translate.js';
import Interaction from '../../../../src/ol/interaction/Interaction.js'; import Interaction from '../../../../src/ol/interaction/Interaction.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js'; import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -33,7 +33,7 @@ describe('ol.interaction.Translate', function() {
geometry: new Point([20, -30]) geometry: new Point([20, -30])
})]; })];
source.addFeatures(features); source.addFeatures(features);
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
map = new Map({ map = new Map({
target: target, target: target,
layers: [layer], layers: [layer],

View File

@@ -1,5 +1,5 @@
import _ol_layer_Layer_ from '../../../../src/ol/layer/Layer.js'; import _ol_layer_Layer_ from '../../../../src/ol/layer/Layer.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
import _ol_style_Style_ from '../../../../src/ol/style/Style.js'; import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
@@ -11,13 +11,13 @@ describe('ol.layer.Vector', function() {
var style = new _ol_style_Style_(); var style = new _ol_style_Style_();
it('creates a new layer', function() { it('creates a new layer', function() {
var layer = new _ol_layer_Vector_({source: source}); var layer = new VectorLayer({source: source});
expect(layer).to.be.a(_ol_layer_Vector_); expect(layer).to.be.a(VectorLayer);
expect(layer).to.be.a(_ol_layer_Layer_); expect(layer).to.be.a(_ol_layer_Layer_);
}); });
it('accepts a style option with a single style', function() { it('accepts a style option with a single style', function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source, source: source,
style: style style: style
}); });
@@ -27,7 +27,7 @@ describe('ol.layer.Vector', function() {
}); });
it('accepts a style option with an array of styles', function() { it('accepts a style option with an array of styles', function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source, source: source,
style: [style] style: [style]
}); });
@@ -37,7 +37,7 @@ describe('ol.layer.Vector', function() {
}); });
it('accepts a style option with a style function', function() { it('accepts a style option with a style function', function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source, source: source,
style: function(feature, resolution) { style: function(feature, resolution) {
return [style]; return [style];
@@ -55,7 +55,7 @@ describe('ol.layer.Vector', function() {
var layer, style; var layer, style;
beforeEach(function() { beforeEach(function() {
layer = new _ol_layer_Vector_({ layer = new VectorLayer({
source: new _ol_source_Vector_() source: new _ol_source_Vector_()
}); });
style = new _ol_style_Style_(); style = new _ol_style_Style_();
@@ -101,7 +101,7 @@ describe('ol.layer.Vector', function() {
var style = new _ol_style_Style_(); var style = new _ol_style_Style_();
it('returns what is provided to setStyle', function() { it('returns what is provided to setStyle', function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: source source: source
}); });

View File

@@ -11,7 +11,7 @@ import Interaction from '../../../src/ol/interaction/Interaction.js';
import MouseWheelZoom from '../../../src/ol/interaction/MouseWheelZoom.js'; import MouseWheelZoom from '../../../src/ol/interaction/MouseWheelZoom.js';
import _ol_interaction_PinchZoom_ from '../../../src/ol/interaction/PinchZoom.js'; import _ol_interaction_PinchZoom_ from '../../../src/ol/interaction/PinchZoom.js';
import TileLayer from '../../../src/ol/layer/Tile.js'; import TileLayer from '../../../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../src/ol/layer/Vector.js';
import _ol_renderer_canvas_IntermediateCanvas_ from '../../../src/ol/renderer/canvas/IntermediateCanvas.js'; import _ol_renderer_canvas_IntermediateCanvas_ from '../../../src/ol/renderer/canvas/IntermediateCanvas.js';
import _ol_source_Vector_ from '../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../src/ol/source/Vector.js';
import _ol_source_XYZ_ from '../../../src/ol/source/XYZ.js'; import _ol_source_XYZ_ from '../../../src/ol/source/XYZ.js';
@@ -195,7 +195,7 @@ describe('ol.Map', function() {
document.body.appendChild(target); document.body.appendChild(target);
map = new Map({ map = new Map({
target: target, target: target,
layers: [new _ol_layer_Vector_({ layers: [new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [new Feature(new LineString([[-50, 0], [50, 0]]))] features: [new Feature(new LineString([[-50, 0], [50, 0]]))]
}) })
@@ -225,7 +225,7 @@ describe('ol.Map', function() {
it('returns an array of found features with declutter: true', function() { it('returns an array of found features with declutter: true', function() {
var layer = map.getLayers().item(0); var layer = map.getLayers().item(0);
map.removeLayer(layer); map.removeLayer(layer);
var otherLayer = new _ol_layer_Vector_({ var otherLayer = new VectorLayer({
declutter: true, declutter: true,
source: layer.getSource() source: layer.getSource()
}); });
@@ -237,7 +237,7 @@ describe('ol.Map', function() {
}); });
it('respects options', function() { it('respects options', function() {
var otherLayer = new _ol_layer_Vector_({ var otherLayer = new VectorLayer({
source: new _ol_source_Vector_ source: new _ol_source_Vector_
}); });
map.addLayer(otherLayer); map.addLayer(otherLayer);

View File

@@ -4,7 +4,7 @@ import Map from '../../../../../src/ol/Map.js';
import View from '../../../../../src/ol/View.js'; import View from '../../../../../src/ol/View.js';
import 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 _ol_layer_Vector_ from '../../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../../src/ol/layer/Vector.js';
import _ol_renderer_canvas_Layer_ from '../../../../../src/ol/renderer/canvas/Layer.js'; import _ol_renderer_canvas_Layer_ from '../../../../../src/ol/renderer/canvas/Layer.js';
import CanvasMapRenderer from '../../../../../src/ol/renderer/canvas/Map.js'; import CanvasMapRenderer from '../../../../../src/ol/renderer/canvas/Map.js';
import _ol_source_Vector_ from '../../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../../src/ol/source/Vector.js';
@@ -50,7 +50,7 @@ describe('ol.renderer.canvas.Map', function() {
}; };
img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=='; img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==';
layer = new _ol_layer_Vector_({ layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [ features: [
new Feature({ new Feature({
@@ -92,7 +92,7 @@ describe('ol.renderer.canvas.Map', function() {
it('calls callback with main layer when skipped feature on unmanaged layer', function() { it('calls callback with main layer when skipped feature on unmanaged layer', function() {
var feature = layer.getSource().getFeatures()[0]; var feature = layer.getSource().getFeatures()[0];
var managedLayer = new _ol_layer_Vector_({ var managedLayer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}) })
@@ -169,7 +169,7 @@ describe('ol.renderer.canvas.Map', function() {
beforeEach(function() { beforeEach(function() {
map = new Map({}); map = new Map({});
map.on('postcompose', function() {}); map.on('postcompose', function() {});
layer = new _ol_layer_Vector_({ layer = new VectorLayer({
source: new _ol_source_Vector_({wrapX: true}) source: new _ol_source_Vector_({wrapX: true})
}); });
renderer = map.getRenderer(); renderer = map.getRenderer();

View File

@@ -4,7 +4,7 @@ import Map from '../../../../../src/ol/Map.js';
import View from '../../../../../src/ol/View.js'; import View from '../../../../../src/ol/View.js';
import * as _ol_extent_ from '../../../../../src/ol/extent.js'; import * as _ol_extent_ from '../../../../../src/ol/extent.js';
import Point from '../../../../../src/ol/geom/Point.js'; import Point from '../../../../../src/ol/geom/Point.js';
import _ol_layer_Vector_ from '../../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../../src/ol/layer/Vector.js';
import _ol_obj_ from '../../../../../src/ol/obj.js'; import _ol_obj_ from '../../../../../src/ol/obj.js';
import {get as getProjection} from '../../../../../src/ol/proj.js'; import {get as getProjection} from '../../../../../src/ol/proj.js';
import _ol_render_canvas_ from '../../../../../src/ol/render/canvas.js'; import _ol_render_canvas_ from '../../../../../src/ol/render/canvas.js';
@@ -37,7 +37,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
}); });
it('creates a new instance', function() { it('creates a new instance', function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_() source: new _ol_source_Vector_()
}); });
var renderer = new CanvasVectorLayerRenderer(layer); var renderer = new CanvasVectorLayerRenderer(layer);
@@ -69,7 +69,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
var feature1 = new Feature(new Point([0, 0])); var feature1 = new Feature(new Point([0, 0]));
var feature2 = new Feature(new Point([0, 0])); var feature2 = new Feature(new Point([0, 0]));
feature2.setStyle(featureStyle); feature2.setStyle(featureStyle);
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature1, feature2] features: [feature1, feature2]
}), }),
@@ -101,7 +101,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
}); });
var feature = new Feature(new Point([0, 0])); var feature = new Feature(new Point([0, 0]));
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}), }),
@@ -132,7 +132,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
}); });
var feature = new Feature(new Point([0, 0])); var feature = new Feature(new Point([0, 0]));
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}), }),
@@ -164,7 +164,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
}); });
var feature = new Feature(new Point([0, 0])); var feature = new Feature(new Point([0, 0]));
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({ source: new _ol_source_Vector_({
features: [feature] features: [feature]
}), }),
@@ -185,7 +185,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
var layer, renderer; var layer, renderer;
beforeEach(function() { beforeEach(function() {
layer = new _ol_layer_Vector_({ layer = new VectorLayer({
source: new _ol_source_Vector_() source: new _ol_source_Vector_()
}); });
renderer = new CanvasVectorLayerRenderer(layer); renderer = new CanvasVectorLayerRenderer(layer);
@@ -222,7 +222,7 @@ describe('ol.renderer.canvas.VectorLayer', function() {
var frameState, projExtent, renderer, worldWidth, buffer; var frameState, projExtent, renderer, worldWidth, buffer;
beforeEach(function() { beforeEach(function() {
var layer = new _ol_layer_Vector_({ var layer = new VectorLayer({
source: new _ol_source_Vector_({wrapX: true}) source: new _ol_source_Vector_({wrapX: true})
}); });
renderer = new CanvasVectorLayerRenderer(layer); renderer = new CanvasVectorLayerRenderer(layer);

View File

@@ -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 Point from '../../../../src/ol/geom/Point.js'; import Point from '../../../../src/ol/geom/Point.js';
import LineString from '../../../../src/ol/geom/LineString.js'; import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js'; import VectorLayer from '../../../../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../../../../src/ol/loadingstrategy.js'; import _ol_loadingstrategy_ from '../../../../src/ol/loadingstrategy.js';
import {get as getProjection, transformExtent, fromLonLat} from '../../../../src/ol/proj.js'; import {get as getProjection, transformExtent, fromLonLat} from '../../../../src/ol/proj.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js'; import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -441,7 +441,7 @@ describe('ol.source.Vector', function() {
var map = new Map({ var map = new Map({
target: div, target: div,
layers: [ layers: [
new _ol_layer_Vector_({ new VectorLayer({
source: source source: source
}) })
], ],