Update the js script for detail and list page members no geolocation
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 20 Jun 2016 12:43:35 +0000 (08:43 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 20 Jun 2016 12:43:35 +0000 (08:43 -0400)
The geolocation is not being used currently and some browsers are asking
for permission evertime they get to the list or detail pages for
members.

views/front/members/detail.html
views/front/members/list.html

index ccb3a38..810f70c 100644 (file)
                     title: '{$member.member|escape}'
                 });
              {/if}
-                // Try HTML5 to get user geolocation
-                if(navigator.geolocation) {
-                  navigator.geolocation.getCurrentPosition(function(position) {
-                    myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
-                    var pinIcon = new google.maps.MarkerImage(
-                        'https://maps.google.com/mapfiles/kml/shapes/man.png',
-                        null, /* size is determined at runtime */
-                        null, /* origin is 0,0 */
-                        null, /* anchor is bottom center of the scaled image */
-                        new google.maps.Size(30, 30)
-                    );
-                    var myMarker = new google.maps.Marker({  
-                        map: map,  
-                        position: myLocation,
-                        draggable: false,
-                        animation: google.maps.Animation.DROP,  
-                        title: 'My Location',
-                        icon: pinIcon,
-                        zIndex: 100
-                    });
-                    $('#glm-startLocation').attr('placeholder', 'Leave blank for your current location or enter address here.');
-                  });
-                }
+                // Don't Try HTML5 to get user geolocation
+                //if(navigator.geolocation) {
+                  //navigator.geolocation.getCurrentPosition(function(position) {
+                    //myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
+                    //var pinIcon = new google.maps.MarkerImage(
+                        //'https://maps.google.com/mapfiles/kml/shapes/man.png',
+                        //null, /* size is determined at runtime */
+                        //null, /* origin is 0,0 */
+                        //null, /* anchor is bottom center of the scaled image */
+                        //new google.maps.Size(30, 30)
+                    //);
+                    //var myMarker = new google.maps.Marker({  
+                        //map: map,  
+                        //position: myLocation,
+                        //draggable: false,
+                        //animation: google.maps.Animation.DROP,  
+                        //title: 'My Location',
+                        //icon: pinIcon,
+                        //zIndex: 100
+                    //});
+                    //$('#glm-startLocation').attr('placeholder', 'Leave blank for your current location or enter address here.');
+                  //});
+                //}
                 
-            }
+            //}
             
             // Load map
             google.maps.event.addDomListener(window, 'load', initMap);
index 23d6255..1aeb04b 100644 (file)
                         var bounds = new google.maps.LatLngBounds();
                         var infowindow = new google.maps.InfoWindow();
 
-                        // Try HTML5 to get user geolocation
-                        if(navigator.geolocation) {
-                            navigator.geolocation.getCurrentPosition(function(position) {
-                                var myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
-                                var pinIcon = new google.maps.MarkerImage(
-                                        'https://maps.google.com/mapfiles/kml/shapes/man.png',
-                                    null, /* size is determined at runtime */
-                                    null, /* origin is 0,0 */
-                                    null, /* anchor is bottom center of the scaled image */
-                                    new google.maps.Size(30, 30)
-                                );
-                                var myMarker = new google.maps.Marker({
-                                    map: map,
-                                    position: myLocation,
-                                    draggable: false,
-                                    animation: google.maps.Animation.DROP,
-                                    title: 'My Location',
-                                    icon: pinIcon,
-                                    zIndex: 100
-                                });
-                            });
-                        }
+                        // Don't Try HTML5 to get user geolocation
+                        //if(navigator.geolocation) {
+                            //navigator.geolocation.getCurrentPosition(function(position) {
+                                //var myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
+                                //var pinIcon = new google.maps.MarkerImage(
+                                        //'https://maps.google.com/mapfiles/kml/shapes/man.png',
+                                    //null, /* size is determined at runtime */
+                                    //null, /* origin is 0,0 */
+                                    //null, /* anchor is bottom center of the scaled image */
+                                    //new google.maps.Size(30, 30)
+                                //);
+                                //var myMarker = new google.maps.Marker({
+                                    //map: map,
+                                    //position: myLocation,
+                                    //draggable: false,
+                                    //animation: google.maps.Animation.DROP,
+                                    //title: 'My Location',
+                                    //icon: pinIcon,
+                                    //zIndex: 100
+                                //});
+                            //});
+                        //}
 
                 {if $haveMembers}
                     {foreach $members as $m}