Fixed some geolocation problems.
authorChuck Scott <cscott@gaslightmedia.com>
Sun, 8 Mar 2015 01:41:37 +0000 (20:41 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Sun, 8 Mar 2015 01:41:37 +0000 (20:41 -0500)
config/plugin.ini
views/admin/member/memberInfo.html

index 8c7daf2..910160d 100644 (file)
@@ -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]
 
+
index a80329d..8badaf8 100644 (file)
@@ -1,6 +1,6 @@
 {include file='admin/member/header.html'}
 
-    <script src="http://maps.googleapis.com/maps/api/js?sensor=true&key={$googleMapsBrowserApiKey}"></script>
+    <script src="http://maps.googleapis.com/maps/api/js?sensor=true&key={$googleMapsBrowserApiKey}"></script>{$googleMapsBrowserApiKey}
     
     {if $haveMemberInfo}
         <!--  Delete Member Information dialog -->
                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) {
                        
                            marker.setPosition( results[0].geometry.location );
 
                        // Otherwise tell the user. 
-                   } else {
-alert(status + ' - ' + geoAddress);                            
+                   } else {                            
                        $('#mapPosition').html('<span class="glm-notice">Not able to estimate position from the above address.</span>');
                    }
                });