Update script.js

this deactivates the map upon leaving