ich in der Dokumentation bin für ol.FeatureOverlay hereOpenlayers 3 Highlight-Funktion
und am Beispiel für ol.FeatureOverlay here präsentiert
so ...
var featureOverlay = new ol.FeatureOverlay({
map: map,
style: function (feature, resolution) {
var style;
var geom = feature.getGeometry();
if (geom.getType() == 'Point') {
var text = feature.get('text');
baseTextStyle.text = text;
// this is inefficient as it could create new style objects for the
// same text.
// A good exercise to see if you understand would be to add caching
// of this text style
var isoCode = feature.get('isoCode').toLowerCase();
style = new ol.style.Style({
text: new ol.style.Text(baseTextStyle),
image: new ol.style.Icon({
src: '../assets/img/flags/' + isoCode + '.png'
}),
zIndex: 2
});
} else {
style = highlightStyle;
}
return [style];
}
});
aber Ich erhalte den Fehler "TypeError: ol.FeatureOverlay ist kein Konstruktor"
Ich bin auf OL3 3.16. Jede Hilfe in dieser Angelegenheit wird sehr geschätzt !!