Should modify getUrl to take a second options parameter and have it return the full url.  So then this line could be removed and the one below would become:
```js
window.location.href = getUrl('browse-latlng', { lat: position.coords.latitude, lng: position.coords.longitude });
```
and the appropriate switch case above would become
```js
return '/browse/'+ opts.lat + '/' + opts.lng + '/';
```