I am looking for a way to force my javascript application to wait for the coordiantes before doing more code. I want the following command or something similar to be synchronous not asynchronous.
navigator.geolocation.getCurrentPosition(getGPSCoordinates);
I'm aware that I could just put my code in the callback function but is this the only way? Isn't there a way for me to just wait for it to finish and then make my decision?