Moving hero in tile map

Hey do u have any idea or source code for moving tile with static hero possition in the center of screen ?

sth. similar to:

void Hero::setViewPointCenter(Point position, cocos2d::TMXTiledMap *tilemap) {
auto winSize = Director::getInstance()->getWinSize();

int x = MAX(position.x, winSize.width / 2);
int y = MAX(position.y, winSize.height / 2);
x = MIN(x, (tilemap->getMapSize().width * tilemap->getTileSize().width) - winSize.width / 2);
y = MIN(y, (tilemap->getMapSize().height *tilemap->getTileSize().height) - winSize.height / 2);
auto actualPosition = Point(hero->getPosition());

auto centerOfView = Point(winSize.width/2 , winSize.height/2);
auto viewPoint = centerOfView - actualPosition;
tilemap->setPosition(viewPoint);

}