Update map.js

Added restricted movement function
Merge pull request #1 from bbarringer8/patch-1

Update map.js