new method to automatically determine styles for markers