Skip to content

Commit

Permalink
Migrate vectors example
Browse files Browse the repository at this point in the history
Stop using deprecated constructor.
  • Loading branch information
gberaudo committed Dec 7, 2017
1 parent b6a7c1e commit b9d95ff
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions examples/vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ goog.require('ol.format.GPX');
goog.require('ol.geom.Polygon');
goog.require('ol.interaction.DragAndDrop');
goog.require('ol.geom.MultiPolygon');
goog.require('ol.layer.Image');
goog.require('ol.layer.Vector');
goog.require('ol.source.ImageVector');


const iconFeature = new ol.Feature({
Expand Down Expand Up @@ -234,12 +232,9 @@ const vectorSource2 = new ol.source.Vector({
features: [iconFeature, textFeature, cervinFeature, cartographicRectangle,
cartographicRectangle2]
});
const imageVectorSource = new ol.source.ImageVector({
const vectorLayer2 = new ol.layer.Vector({
source: vectorSource2
});
const vectorLayer2 = new ol.layer.Image({
source: imageVectorSource
});

const dragAndDropInteraction = new ol.interaction.DragAndDrop({
formatConstructors: [
Expand Down

0 comments on commit b9d95ff

Please sign in to comment.