regions.js fixed

Fixed regions.js, added an example. Now you can draw polylines and polygons on the map. Works for #1175 and #642 . Maybe helps with #889