fix map exemplars
fix reading cmap
add emit_cmap