<a> Tag created dynamically doesn't work


i’m working in an app that create a custom map using OpenLayers.

When you tap on a marker this library open a PopUp with some information and a link to the detail page of the marker.

The PopUp and the content are created dynamically by OpenLayers.

So when i tap on a link in the dynamically created PopUp nothing happens.

How can i bind the new html link?


Hi bellu,

I’m struggling with the same ghost and googeling about the combination Ionic and openlayers 3, we seem to be the only ones trying to use a map in an Ionic app. Could you solve this problem in the meantime? Any hint would be appreciated.

Greetings and thanks

Got it:
When you create your overlay, don’t forget to set the option “stopEvent” to “false” like this:

var infoOverlay = new ol.Overlay({
positioning: ‘center-center’,
position: [0, 0],
stopEvent: false

Default value is “true” and converts your overlay to a dead mouse.

Hope this helps

Thank you @tobu. I didn’t find a solution for this, i used a workaround to solve the problem.