ticket:75 fix problem with cycle in resourse and fix js for map