Tunable luminescent lanthanide coordination polymers based on reversible solid-state ion-exchange monitored by ion-dependent photoinduced emission spectra.