Fixed a variable naming bug in map.js.