Small improvements to map.js and RasterLayer.js