Code Review Make Html Javascript Geolocation Function More Linear

Code Review Make Html Javascript Geolocation Function More Linear