Revised changes to map js