Update maps.js

Minor changes to code.