mergeNewSegments

Merges new segments into the map. The key should correspond to the segment id.