goole map block script refactor