It should be $wgCityId from globals, not $this->wg