DRY out code for generating map-marker data.