You don't have to set it up so they have to wait for the result to be returned.  Remember, the point of this "guess my location" button has nothing to do with a technical limitation; it's just a way of giving the user a sense of ease.  You could easily automatically figure out their location when they come to the site, but just keep it hidden until they click the button.