Port vector examples to new vector API
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.format.GeoJSON');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.GeoJSON');
|
||||
goog.require('ol.source.MapQuest');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Circle');
|
||||
goog.require('ol.style.Fill');
|
||||
goog.require('ol.style.Stroke');
|
||||
@@ -124,9 +125,9 @@ var createPolygonStyleFunction = function() {
|
||||
};
|
||||
|
||||
var vectorPolygons = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/polygon-samples.geojson'
|
||||
source: new ol.source.Vector({
|
||||
url: 'data/geojson/polygon-samples.geojson',
|
||||
format: new ol.format.GeoJSON()
|
||||
}),
|
||||
style: createPolygonStyleFunction()
|
||||
});
|
||||
@@ -147,9 +148,9 @@ var createLineStyleFunction = function() {
|
||||
};
|
||||
|
||||
var vectorLines = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/line-samples.geojson'
|
||||
source: new ol.source.Vector({
|
||||
url: 'data/geojson/line-samples.geojson',
|
||||
format: new ol.format.GeoJSON()
|
||||
}),
|
||||
style: createLineStyleFunction()
|
||||
});
|
||||
@@ -171,9 +172,9 @@ var createPointStyleFunction = function() {
|
||||
};
|
||||
|
||||
var vectorPoints = new ol.layer.Vector({
|
||||
source: new ol.source.GeoJSON({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/point-samples.geojson'
|
||||
source: new ol.source.Vector({
|
||||
url: 'data/geojson/point-samples.geojson',
|
||||
format: new ol.format.GeoJSON()
|
||||
}),
|
||||
style: createPointStyleFunction()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user