Rename _ol_source_Vector_ to VectorSource
This commit is contained in:
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -15,7 +15,7 @@ import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
// 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
|
||||
var redLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [new Feature(new Point([0, 0]))]
|
||||
}),
|
||||
style: new _ol_style_Style_({
|
||||
@@ -32,7 +32,7 @@ var redLayer = new VectorLayer({
|
||||
})
|
||||
});
|
||||
var greenLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
// 433.013 is roughly 250 * Math.sqrt(3)
|
||||
features: [new Feature(new Point([250, 433.013]))]
|
||||
}),
|
||||
@@ -50,7 +50,7 @@ var greenLayer = new VectorLayer({
|
||||
})
|
||||
});
|
||||
var blueLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [new Feature(new Point([500, 0]))]
|
||||
}),
|
||||
style: new _ol_style_Style_({
|
||||
|
||||
@@ -7,10 +7,10 @@ import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import _ol_has_ from '../src/ol/has.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -82,7 +82,7 @@ var getStackedStyle = function(feature, resolution) {
|
||||
|
||||
// Create a vector layer that makes use of the style function above…
|
||||
var vectorLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
|
||||
@@ -5,13 +5,13 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
url: 'data/geojson/switzerland.geojson',
|
||||
format: new GeoJSON()
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Cluster_ from '../src/ol/source/Cluster.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -24,7 +24,7 @@ for (var i = 0; i < count; ++i) {
|
||||
features[i] = new Feature(new Point(coordinates));
|
||||
}
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
features: features
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import _ol_interaction_Pointer_ from '../src/ol/interaction/Pointer.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -153,7 +153,7 @@ var map = new Map({
|
||||
})
|
||||
}),
|
||||
new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [pointFeature, lineFeature, polygonFeature]
|
||||
}),
|
||||
style: new _ol_style_Style_({
|
||||
|
||||
@@ -10,7 +10,7 @@ import DragAndDrop from '../src/ol/interaction/DragAndDrop.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -111,7 +111,7 @@ var map = new Map({
|
||||
});
|
||||
|
||||
dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: event.features
|
||||
});
|
||||
map.addLayer(new VectorLayer({
|
||||
|
||||
@@ -10,7 +10,7 @@ import DragAndDrop from '../src/ol/interaction/DragAndDrop.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -111,7 +111,7 @@ var map = new Map({
|
||||
});
|
||||
|
||||
dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: event.features
|
||||
});
|
||||
map.addLayer(new VectorLayer({
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -16,7 +16,7 @@ var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_();
|
||||
var source = new VectorSource();
|
||||
var vector = new VectorLayer({
|
||||
source: source,
|
||||
style: new _ol_style_Style_({
|
||||
|
||||
@@ -4,13 +4,13 @@ import Draw from '../src/ol/interaction/Draw.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_({wrapX: false});
|
||||
var source = new VectorSource({wrapX: false});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: source
|
||||
|
||||
@@ -4,13 +4,13 @@ import Draw from '../src/ol/interaction/Draw.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_({wrapX: false});
|
||||
var source = new VectorSource({wrapX: false});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: source
|
||||
|
||||
@@ -5,13 +5,13 @@ import Draw from '../src/ol/interaction/Draw.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_({wrapX: false});
|
||||
var source = new VectorSource({wrapX: false});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: source
|
||||
|
||||
@@ -8,7 +8,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Cluster_ from '../src/ol/source/Cluster.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
|
||||
@@ -124,7 +124,7 @@ function selectStyleFunction(feature) {
|
||||
vector = new VectorLayer({
|
||||
source: new _ol_source_Cluster_({
|
||||
distance: 40,
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml',
|
||||
format: new KML({
|
||||
extractStyles: false
|
||||
|
||||
@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_render_ from '../src/ol/render.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -53,7 +53,7 @@ var styleFunction = function(feature) {
|
||||
};
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml',
|
||||
format: new KML({
|
||||
extractStyles: false
|
||||
|
||||
@@ -7,7 +7,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var map = new Map({
|
||||
layers: [
|
||||
@@ -15,7 +15,7 @@ var map = new Map({
|
||||
source: new _ol_source_OSM_()
|
||||
}),
|
||||
new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@ import WKT from '../src/ol/format/WKT.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
@@ -20,7 +20,7 @@ var feature = format.readFeature(
|
||||
feature.getGeometry().transform('EPSG:4326', 'EPSG:3857');
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [feature]
|
||||
})
|
||||
});
|
||||
|
||||
@@ -6,9 +6,9 @@ import _ol_interaction_Extent_ from '../src/ol/interaction/Extent.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -35,7 +35,7 @@ var map = new Map({
|
||||
})
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
wrapX: false
|
||||
});
|
||||
var vector = new VectorLayer({
|
||||
|
||||
@@ -6,7 +6,7 @@ import Point from '../src/ol/geom/Point.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
@@ -114,7 +114,7 @@ var speedInput = document.getElementById('speed');
|
||||
var startButton = document.getElementById('start-animation');
|
||||
|
||||
var vectorLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [routeFeature, geoMarker, startMarker, endMarker]
|
||||
}),
|
||||
style: function(feature) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import LineString from '../src/ol/geom/LineString.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -70,7 +70,7 @@ var animateFlights = function(event) {
|
||||
map.render();
|
||||
};
|
||||
|
||||
flightsSource = new _ol_source_Vector_({
|
||||
flightsSource = new VectorSource({
|
||||
wrapX: false,
|
||||
attributions: 'Flight data by ' +
|
||||
'<a href="http://openflights.org/data.html">OpenFlights</a>,',
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var radius = 10e6;
|
||||
var cos30 = Math.cos(Math.PI / 6);
|
||||
@@ -18,7 +18,7 @@ var triangle = new LineString([
|
||||
var feature = new Feature(triangle);
|
||||
|
||||
var layer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [feature]
|
||||
})
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import Circle from '../src/ol/geom/Circle.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -160,7 +160,7 @@ var geojsonObject = {
|
||||
}]
|
||||
};
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: (new GeoJSON()).readFeatures(geojsonObject)
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import Point from '../src/ol/geom/Point.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -88,7 +88,7 @@ geolocation.on('change:position', function() {
|
||||
|
||||
new VectorLayer({
|
||||
map: map,
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [accuracyFeature, positionFeature]
|
||||
})
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import GPX from '../src/ol/format/GPX.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -45,7 +45,7 @@ var style = {
|
||||
};
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/gpx/fells_loop.gpx',
|
||||
format: new GPX()
|
||||
}),
|
||||
|
||||
@@ -4,13 +4,13 @@ import KML from '../src/ol/format/KML.js';
|
||||
import HeatmapLayer from '../src/ol/layer/Heatmap.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var blur = document.getElementById('blur');
|
||||
var radius = document.getElementById('radius');
|
||||
|
||||
var vector = new HeatmapLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml',
|
||||
format: new KML({
|
||||
extractStyles: false
|
||||
|
||||
@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import Feature from '../src/ol/Feature.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -23,7 +23,7 @@ var style = new _ol_style_Style_({
|
||||
var feature = new Feature(new LineString([[-4000000, 0], [4000000, 0]]));
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [feature]
|
||||
}),
|
||||
style: style
|
||||
|
||||
@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -48,7 +48,7 @@ madrid.setStyle(new _ol_style_Style_({
|
||||
}));
|
||||
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: [rome, london, madrid]
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -35,7 +35,7 @@ var map = new Map({
|
||||
style: function(feature) {
|
||||
return feature.get('style');
|
||||
},
|
||||
source: new _ol_source_Vector_({features: [iconFeature]})
|
||||
source: new VectorSource({features: [iconFeature]})
|
||||
})
|
||||
],
|
||||
target: document.getElementById('map'),
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -72,7 +72,7 @@ for (i = 0; i < featureCount; ++i) {
|
||||
features[i] = feature;
|
||||
}
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: features
|
||||
});
|
||||
var vector = new VectorLayer({
|
||||
@@ -98,7 +98,7 @@ for (i = 0; i < featureCount; i += 30) {
|
||||
|
||||
new VectorLayer({
|
||||
map: map,
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: overlayFeatures
|
||||
}),
|
||||
style: new _ol_style_Style_({
|
||||
|
||||
@@ -6,7 +6,7 @@ import Point from '../src/ol/geom/Point.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -29,7 +29,7 @@ var iconStyle = new _ol_style_Style_({
|
||||
|
||||
iconFeature.setStyle(iconStyle);
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: [iconFeature]
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import Point from '../src/ol/geom/Point.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -39,7 +39,7 @@ var styleFunction = function(feature) {
|
||||
return style;
|
||||
};
|
||||
|
||||
var vectorSource = new _ol_source_Vector_();
|
||||
var vectorSource = new VectorSource();
|
||||
|
||||
var igcUrls = [
|
||||
'data/igc/Clement-Latour.igc',
|
||||
@@ -176,7 +176,7 @@ map.on('postcompose', function(evt) {
|
||||
});
|
||||
|
||||
var featureOverlay = new VectorLayer({
|
||||
source: new _ol_source_Vector_(),
|
||||
source: new VectorSource(),
|
||||
map: map,
|
||||
style: new _ol_style_Style_({
|
||||
image: new _ol_style_Circle_({
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -24,7 +24,7 @@ var map = new Map({
|
||||
layers: [
|
||||
new VectorLayer({
|
||||
renderMode: 'image',
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
@@ -42,7 +42,7 @@ var map = new Map({
|
||||
});
|
||||
|
||||
var featureOverlay = new VectorLayer({
|
||||
source: new _ol_source_Vector_(),
|
||||
source: new VectorSource(),
|
||||
map: map,
|
||||
style: new _ol_style_Style_({
|
||||
stroke: new _ol_style_Stroke_({
|
||||
|
||||
@@ -7,10 +7,10 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
var source = new _ol_source_Vector_();
|
||||
var source = new VectorSource();
|
||||
fetch('data/geojson/roads-seoul.geojson').then(function(response) {
|
||||
return response.json();
|
||||
}).then(function(json) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import KML from '../src/ol/format/KML.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -39,7 +39,7 @@ var styleFunction = function(feature) {
|
||||
};
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/2012_Earthquakes_Mag5.kml',
|
||||
format: new KML({
|
||||
extractStyles: false
|
||||
|
||||
@@ -4,7 +4,7 @@ import KML from '../src/ol/format/KML.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -46,7 +46,7 @@ var styleFunction = function(feature) {
|
||||
};
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/timezones.kml',
|
||||
format: new KML({
|
||||
extractStyles: false
|
||||
|
||||
@@ -4,7 +4,7 @@ import KML from '../src/ol/format/KML.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_BingMaps_({
|
||||
@@ -14,7 +14,7 @@ var raster = new TileLayer({
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/kml/2012-02-10.kml',
|
||||
format: new KML()
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -49,7 +49,7 @@ function createLayer(coordinates, style, zIndex) {
|
||||
var feature = new Feature(new Point(coordinates));
|
||||
feature.setStyle(style);
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
features: [feature]
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Draw from '../src/ol/interaction/Draw.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -14,7 +14,7 @@ var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_();
|
||||
var source = new VectorSource();
|
||||
|
||||
var styleFunction = function(feature) {
|
||||
var geometry = feature.getGeometry();
|
||||
|
||||
@@ -9,7 +9,7 @@ import Draw from '../src/ol/interaction/Draw.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -20,7 +20,7 @@ var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var source = new _ol_source_Vector_();
|
||||
var source = new VectorSource();
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: source,
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
var raster = new TileLayer({
|
||||
@@ -15,7 +15,7 @@ var raster = new TileLayer({
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON(),
|
||||
wrapX: false
|
||||
|
||||
@@ -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_Select_ from '../src/ol/interaction/Select.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -144,7 +144,7 @@ var geojsonObject = {
|
||||
}]
|
||||
};
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
features: (new GeoJSON()).readFeatures(geojsonObject)
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import MultiPoint from '../src/ol/geom/MultiPoint.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -80,7 +80,7 @@ var geojsonObject = {
|
||||
}]
|
||||
};
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
features: (new GeoJSON()).readFeatures(geojsonObject)
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_RegularShape_ from '../src/ol/style/RegularShape.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -76,7 +76,7 @@ for (var i = 0; i < count; ++i) {
|
||||
features[i].setStyle(styles[styleKeys[Math.floor(Math.random() * 5)]]);
|
||||
}
|
||||
|
||||
var source = new _ol_source_Vector_({
|
||||
var source = new VectorSource({
|
||||
features: features
|
||||
});
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -18,7 +18,7 @@ var raster = new TileLayer({
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_(),
|
||||
source: new VectorSource(),
|
||||
style: new _ol_style_Style_({
|
||||
fill: new _ol_style_Fill_({
|
||||
color: 'rgba(255, 255, 255, 0.2)'
|
||||
|
||||
@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import {register} from '../src/ol/proj/proj4.js';
|
||||
import proj4 from 'proj4';
|
||||
|
||||
@@ -26,7 +26,7 @@ var map = new Map({
|
||||
keyboardEventTarget: document,
|
||||
layers: [
|
||||
new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries-110m.geojson',
|
||||
format: new GeoJSON()
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
import _ol_style_Text_ from '../src/ol/style/Text.js';
|
||||
@@ -29,7 +29,7 @@ var map = new Map({
|
||||
})
|
||||
}), new VectorLayer({
|
||||
declutter: true,
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
format: new GeoJSON(),
|
||||
url: 'data/geojson/vienna-streets.geojson'
|
||||
}),
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_AtlasManager_ from '../src/ol/style/AtlasManager.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
@@ -99,7 +99,7 @@ for (i = 0; i < featureCount; ++i) {
|
||||
features[i] = feature;
|
||||
}
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: features
|
||||
});
|
||||
var vector = new VectorLayer({
|
||||
|
||||
@@ -3,7 +3,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
@@ -37,7 +37,7 @@ for (i = 0; i < count; ++i) {
|
||||
}
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: features,
|
||||
wrapX: false
|
||||
}),
|
||||
|
||||
@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -40,7 +40,7 @@ var styles = {
|
||||
})
|
||||
};
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
features: features,
|
||||
wrapX: false
|
||||
});
|
||||
|
||||
@@ -5,14 +5,14 @@ import {circular as circularPolygon} from '../src/ol/geom/Polygon.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var vectorLayer4326 = new VectorLayer({
|
||||
source: new _ol_source_Vector_()
|
||||
source: new VectorSource()
|
||||
});
|
||||
|
||||
var vectorLayer3857 = new VectorLayer({
|
||||
source: new _ol_source_Vector_()
|
||||
source: new VectorSource()
|
||||
});
|
||||
|
||||
var map4326 = new Map({
|
||||
|
||||
@@ -4,7 +4,7 @@ import TopoJSON from '../src/ol/format/TopoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -27,7 +27,7 @@ var style = new _ol_style_Style_({
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/topojson/world-110m.json',
|
||||
format: new TopoJSON({
|
||||
// don't want to render the full world polygon (stored as 'land' layer),
|
||||
|
||||
@@ -12,7 +12,7 @@ import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
@@ -24,7 +24,7 @@ var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
});
|
||||
|
||||
var nodes = new _ol_source_Vector_({wrapX: false});
|
||||
var nodes = new VectorSource({wrapX: false});
|
||||
var nodesLayer = new VectorLayer({
|
||||
source: nodes,
|
||||
style: function(f) {
|
||||
@@ -47,7 +47,7 @@ var nodesLayer = new VectorLayer({
|
||||
}
|
||||
});
|
||||
|
||||
var edges = new _ol_source_Vector_({wrapX: false});
|
||||
var edges = new VectorSource({wrapX: false});
|
||||
var edgesLayer = new VectorLayer({
|
||||
source: edges,
|
||||
style: function(f) {
|
||||
@@ -69,7 +69,7 @@ var edgesLayer = new VectorLayer({
|
||||
}
|
||||
});
|
||||
|
||||
var faces = new _ol_source_Vector_({wrapX: false});
|
||||
var faces = new VectorSource({wrapX: false});
|
||||
var facesLayer = new VectorLayer({
|
||||
source: faces,
|
||||
style: function(f) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_interaction_Translate_ from '../src/ol/interaction/Translate.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
var raster = new TileLayer({
|
||||
@@ -15,7 +15,7 @@ var raster = new TileLayer({
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
})
|
||||
|
||||
@@ -7,10 +7,10 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
|
||||
var source = new _ol_source_Vector_();
|
||||
var source = new VectorSource();
|
||||
fetch('data/geojson/roads-seoul.geojson').then(function(response) {
|
||||
return response.json();
|
||||
}).then(function(json) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import _ol_tilegrid_ from '../src/ol/tilegrid.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ var layer = '0';
|
||||
|
||||
var esrijsonFormat = new EsriJSON();
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
loader: function(extent, resolution, projection) {
|
||||
var url = serviceUrl + layer + '/query/?f=json&' +
|
||||
'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' +
|
||||
|
||||
@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -58,7 +58,7 @@ var styleCache = {
|
||||
})
|
||||
};
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
loader: function(extent, resolution, projection) {
|
||||
var url = serviceUrl + layer + '/query/?f=json&' +
|
||||
'returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=' +
|
||||
|
||||
@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../src/ol/extent.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -59,7 +59,7 @@ var countryStyle = new _ol_style_Style_({
|
||||
var style = [countryStyle, labelStyle];
|
||||
|
||||
var vectorLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
|
||||
@@ -4,7 +4,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -141,7 +141,7 @@ function polygonStyleFunction(feature, resolution) {
|
||||
}
|
||||
|
||||
var vectorPolygons = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/polygon-samples.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
@@ -161,7 +161,7 @@ function lineStyleFunction(feature, resolution) {
|
||||
}
|
||||
|
||||
var vectorLines = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/line-samples.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
@@ -182,7 +182,7 @@ function pointStyleFunction(feature, resolution) {
|
||||
}
|
||||
|
||||
var vectorPoints = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/point-samples.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -30,7 +30,7 @@ var style = new _ol_style_Style_({
|
||||
});
|
||||
|
||||
var vectorLayer = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
}),
|
||||
@@ -70,7 +70,7 @@ var highlightStyle = new _ol_style_Style_({
|
||||
});
|
||||
|
||||
var featureOverlay = new VectorLayer({
|
||||
source: new _ol_source_Vector_(),
|
||||
source: new VectorSource(),
|
||||
map: map,
|
||||
style: function(feature) {
|
||||
highlightStyle.getText().setText(feature.get('name'));
|
||||
|
||||
@@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import {transformExtent} from '../src/ol/proj.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -77,7 +77,7 @@ var styles = {
|
||||
}
|
||||
};
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
format: new OSMXML(),
|
||||
loader: function(extent, resolution, projection) {
|
||||
var epsg4326Extent = transformExtent(extent, projection, 'EPSG:4326');
|
||||
|
||||
@@ -6,12 +6,12 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
|
||||
var vectorSource = new _ol_source_Vector_();
|
||||
var vectorSource = new VectorSource();
|
||||
var vector = new VectorLayer({
|
||||
source: vectorSource,
|
||||
style: new _ol_style_Style_({
|
||||
|
||||
@@ -5,12 +5,12 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
var vectorSource = new VectorSource({
|
||||
format: new GeoJSON(),
|
||||
url: function(extent) {
|
||||
return 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
|
||||
|
||||
@@ -4,7 +4,7 @@ import WKT from '../src/ol/format/WKT.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_OSM_()
|
||||
@@ -22,7 +22,7 @@ var feature = format.readFeature(wkt, {
|
||||
});
|
||||
|
||||
var vector = new VectorLayer({
|
||||
source: new _ol_source_Vector_({
|
||||
source: new VectorSource({
|
||||
features: [feature]
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user