Well, in that case you would need to block your whole content, until the visitor consents… As soon as they enter your website the IP address in logged by your ISP raw logs as well. Just like plugins such as Shield and Wordfence.
I found this: https://eugdprcompliant.com/personal-data/
The major problem is, that you simply cannot NOT get the IP address. For example, if the IP address was not automatically recognised, you would no longer be able to block any hackers etc in your .htaccess. (deny/allow)
So.. thinking ahead (and please do correct me if I’m wrong), isn’t the most logical solution to adapt your site’s settings that if a user accepts them, they will also accept that their IP is shared with Google? In my privacy statement, I had to say that their info is also shared with (in my case) Mollie, as soon as they make a payment. And that was legally sufficient. ??
I did the same with Google Analytics, so I’m guessing Google Maps will be no different.