Skip to content

Commit

Permalink
Explicitly set the marker's style
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Jul 15, 2019
1 parent 7aa562c commit 1801e69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Feature from 'ol/Feature.js';
import Overlay from 'ol/Overlay.js';
import Point from 'ol/geom/Point.js';
import {Icon, Style} from 'ol/style.js';
import {createDefaultStyle} from 'ol/style/Style'
import View from 'ol/View.js';
import VectorSource from 'ol/source/Vector.js';
import VectorLayer from 'ol/layer/Vector.js';
Expand Down Expand Up @@ -246,6 +247,8 @@ class Map {
src: options.icon
})
}));
} else {
marker.setStyle(createDefaultStyle);
}
this.vectorSource_.addFeature(marker);
}
Expand Down

0 comments on commit 1801e69

Please sign in to comment.