It seems that the showGPS command is an outdated command from the OFP days (according to the biki) and currently scripters have no clear way to open the GPS HUD element that players can open by pressing right-ctrl+m (default keybinding).
It would be useful if the showGPS command was updated to open/close said HUD element.
It should also be noted that a visibleGPS command was added to Arma 3 to check whether the HUD element is open. So it would make sense to be able to open and close it via script too.