WhatsApp server connects to the GPS of your phone. That’s why it asks you to enable GPS before using the live location feature. Then it tracks you and shares your location.