From: Chuck Scott Date: Sun, 8 Mar 2015 01:41:37 +0000 (-0500) Subject: Fixed some geolocation problems. X-Git-Tag: v1.0.0~63 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fd274efec81768dc9681b9e353019da2fcc1847d;p=WP-Plugins%2Fglm-member-db.git Fixed some geolocation problems. --- diff --git a/config/plugin.ini b/config/plugin.ini index 8c7daf26..910160dc 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -39,8 +39,10 @@ thumb['crop'] = false ; Account: cscott.glm@gmail.com ; Need to create a new key for each "Project", referrer ; for the project should be the customer's Web site. +; https://accounts.google.com/ServiceLogin ; -googleMapsApiKey = 'AIzaSyDWgyf8MeYdxZRHaN73O37vFbkhvPjjNhU' +;googleMapsApiKey = 'AIzaSyDWgyf8MeYdxZRHaN73O37vFbkhvPjjNhU' +googleMapsApiKey = '' ; General Settings timezone = America/Detroit @@ -229,3 +231,4 @@ phrase['phrase_test'] = 'test' [chuck:common] + diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index a80329d6..8badaf86 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -1,6 +1,6 @@ {include file='admin/member/header.html'} - + {$googleMapsBrowserApiKey} {if $haveMemberInfo} @@ -640,8 +640,8 @@ var geoCountry = $('#country').find('option:selected').text().trim(); // Assemble address string for - var geoAddress = '{$member.name}' + ', ' + geoAddr1 + ', ' + geoAddr2 + ', ' + geoCity + ', ' + geoState + ' ' + geoZIP + ', ' + geoCountry; - + var geoAddress = geoAddr1 + ', ' + geoAddr2 + ', ' + geoCity + ', ' + geoState + ' ' + geoZIP + ', ' + geoCountry; + // Send to Google Geocoder geocoder.geocode( { 'address': geoAddress }, function(results, status) { @@ -651,8 +651,7 @@ marker.setPosition( results[0].geometry.location ); // Otherwise tell the user. - } else { -alert(status + ' - ' + geoAddress); + } else { $('#mapPosition').html('Not able to estimate position from the above address.'); } });