javascript changes map changes