You’re accessing an internet service for the weather, therefore they get your IP, then there’s services out there that map IPs to locations. You can test this by using a VPN and visiting a weather site with GPS/etc turned off. It will show you the weather for the location of your VPN node.