update map.js: factory functions; update render map examples