Now it works for multiple maps on the same page. Used in the frontend.