It doesn't matter where it's displayed, looking at a map while driving takes attention away from the road.
In the days of paper maps everyone knew it was silly and dangerous to try to unfold and read one while driving. I don't know how this common sense has disappeared just because of LCD screens.
A HUD does steal from outward-facing attention. It's ok in aircraft because the forward environment for aircraft is far less cluttered than for a car. That's also why self-driving cars are so much harder to do well than self-flying aircraft.
In the days of paper maps everyone knew it was silly and dangerous to try to unfold and read one while driving. I don't know how this common sense has disappeared just because of LCD screens.