Question :
I want to remove overlaps from existing polygons with javascript.
I guess merging overlapping polygons to single polygon is the easiest way to do this but i don't know how to do this.
You need to implement Vatti's algorithm or use some polygon library which realizes it (or other reliable algo).
Clipper library uses this algorithm, but seems it has not JavaScript binding yet.
Javascript port exists for GPC (sometimes less robust)