implemented a cleaner version for angular of browser geolocation