Modified the createMapId() function to create unique ids more effectively