[js] Correctly add the cluster layer to the map, closes #4029903 [applied]