fixes mouse events, degrading in non-svg browsers and calling on polylines not yet added to a map