move javascrip into map.js