On maps polygon creator, that returns the GeoJSON coordinates