From fd274efec81768dc9681b9e353019da2fcc1847d Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Sat, 7 Mar 2015 20:41:37 -0500 Subject: [PATCH] Fixed some geolocation problems. --- config/plugin.ini | 5 ++++- views/admin/member/memberInfo.html | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) 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.'); } }); -- 2.17.1