How does the watch determine its position indoors?

I last used my watch with GPS 20 km away, but when I go to the map, it shows my actual position (with a question mark because it has no GPS). Does the watch obtain a location from the phone?