A method for online map adaptation is developed. The method utilizes the EKF as a parameter estimator and handles parameter aging, operating point dependent model and measurement quality. Map adaptation, by construction, gives marginally stable models with locally unobservable modes, that are handled. The method is also suitable for offline calibration of maps where the only requirement of the data is that the entire operating region of the system is covered. The method is applied to a truck engine where an air mass-flow sensor adaptation map is estimated based on data from a diesel engine during an ETC. It is shown that an adaptation map can be found in a measurement sequence not specially designed for adaptation.