Allow a javascript function to be called when the map is moved