From: Chuck Scott Date: Fri, 26 Oct 2018 14:55:22 +0000 (-0400) Subject: Minor update to message displayed when address is found without using city name. X-Git-Tag: v2.11.0^2~68 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3617e4662cb52d59ab6987404ef4b24c643e996d;p=WP-Plugins%2Fglm-member-db.git 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. --- 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 {