Record the location when max layer/nodes change

Record the location when max layer/nodes change