Squashed commit of the following:
commit e7f1c4c84579b959fe2997ff4d2315ee53acfe9a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Sep 29 11:22:44 2016 +0100 Add latest change, fix spelling errors in rest of changelog commit 637b5107b557f1c2a56327a40b3d7b4b7297fa29 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 21:13:06 2016 +0100 Add a test for uncertainty parameter commit 5e7504b323debf9c91e0cca428b4dca7dda0789d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 21:11:12 2016 +0100 Format the ternaty operator correctly commit 19c978a5ac59cd7dfdceee9a8f1aaa6539d8ac66 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 20:46:19 2016 +0100 Fix typo commit d4e5b5fc384d0ccd715ea28a51821f958f6c2caa Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 20:41:23 2016 +0100 Add paraphanalia commit a96f104894de6c06dc5e41044482de2355cb4965 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 20:35:17 2016 +0100 Add the geolocation uncertainty to nearby places request commit 0f6d5649e2f3316040d7453f5fcc96ac1f0ac783 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 20:34:38 2016 +0100 Use a query parameter for geolocation uncertainty commit a9147a074315fabb0d76e5991b34a70b2143761c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 19:58:08 2016 +0100 Make use of uncertainty parameter when finding nearby places commit bad384b5d8be3ea8905d8f6ca3c20f448869853d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Wed Sep 28 19:28:42 2016 +0100 Support sending uncertainty value to micropub endpoint
This commit is contained in:
parent
4e69a4d55c
commit
2c6b9df97a
9 changed files with 39 additions and 24 deletions
|
@ -12,13 +12,13 @@ if ('geolocation' in navigator) {
|
|||
function getLocation() {
|
||||
navigator.geolocation.getCurrentPosition(function (position) {
|
||||
//the locate button has been clicked so add the places/map
|
||||
addPlacesMap(position.coords.latitude, position.coords.longitude);
|
||||
addPlacesMap(position.coords.latitude, position.coords.longitude, position.coords.accuracy);
|
||||
});
|
||||
}
|
||||
|
||||
function addPlacesMap(latitude, longitude) {
|
||||
function addPlacesMap(latitude, longitude, uncertainty) {
|
||||
//get the nearby places
|
||||
fetch('/places/near/' + latitude + '/' + longitude, {
|
||||
fetch('/places/near/' + latitude + '/' + longitude + '?' + uncertainty, {
|
||||
credentials: 'same-origin',
|
||||
method: 'get'
|
||||
}).then(function (response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue