Added back JS functions for map