move map javascript to its own file