Saurbaum
Saurbaum

Reputation: 442

OpenLayers3 overlay causes TypeErrors

I'm trying to add an overlay layer to my map from some dynamically constructed data.

map.addLayer(new ol.Overlay({
    position: locations[i],
    positioning: 'center-center',
    element: document.getElementById(screen.id)
}));

I'm assuming there is something wrong with the id of the element I'm passing as screen.id but that is an assumption because when I try it this starts spamming the console every time I attempt to interact with my now blank map.

ol.js:186 Uncaught TypeError: a.bf is not a function
(anonymous function) @ ol.js:186
l.forEach @ ol.js:80
l.bf @ ol.js:186
l.xo @ ol.js:407
(anonymous function) @ ol.js:394

None of which means much to me. Can anyone shed light on what the error is trying to tell me?

Upvotes: 0

Views: 114

Answers (1)

Saurbaum
Saurbaum

Reputation: 442

Foolishly trying to add an overlay as a layer. Interestingly it doesn't throw an exception it just takes it and silently breaks the map.

Upvotes: 1

Related Questions