add map settings to the db
reoganize js