Re-implemented popups by using OpenLayers events