From 3617e4662cb52d59ab6987404ef4b24c643e996d Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 26 Oct 2018 10:55:22 -0400 Subject: [PATCH] Minor update to message displayed when address is found without using city name. Nominatim dosn't check the "preferred" city name from the US ZIP database, but can often find the address without the city name. --- views/admin/member/memberInfo/editProfileAddress.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/views/admin/member/memberInfo/editProfileAddress.html b/views/admin/member/memberInfo/editProfileAddress.html index 78581d2f..d4dba382 100755 --- a/views/admin/member/memberInfo/editProfileAddress.html +++ b/views/admin/member/memberInfo/editProfileAddress.html @@ -199,7 +199,7 @@ * Use OpenStreetMaps Nominatim for Geolocation */ var nominatimAPI = "https://nominatim.openstreetmap.org/search/"; - var addressMapFail = 'Sorry, we were unable to get a map position from the address provided.'; + var addressMapFail = 'Sorry, we were unable to get a map position from the address provided.'; $(document).on('click','#glm-estimate-location', function() { var addrStreet = $('#addr1').val(); @@ -208,8 +208,6 @@ var addrCountry = $('#country').val(); var addrZip = $('#zip').val(); - var haveLocation = false; - var location = $.getJSON( nominatimAPI, { format: 'json', street: addrStreet, @@ -241,7 +239,7 @@ alert(addressMapFail); } else { assignNewPosition(data); - alert('We were unable to match all of your address data but did find this location.\nPlease check that it is correct and adjust as needed by dragging the map pointer.'); + alert('We were unable to match all of your address data but did find this location.\n\n' + data[0].display_name + '\n\nPlease check that it is correct and adjust as needed by dragging the map pointer.\nYou may also want to check the city selected in the address.'); } }); } else { -- 2.17.1