[1.5.x] Fixed #20773 -- [gis] Fixed regression in GoogleMap output

Thanks Martyn Clement for the report and the initial patch.
Backport of 27c1a7257 from master.