Refactoring update tilelayer