Added use of sharedprefs to save the last used map type.