From: Steve Sutton Date: Mon, 20 Jun 2016 12:43:35 +0000 (-0400) Subject: Update the js script for detail and list page members no geolocation X-Git-Tag: v2.1.11^2~3^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9eb397c2a468740c6ffebed588696eed60a86e99;p=WP-Plugins%2Fglm-member-db.git Update the js script for detail and list page members no geolocation 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. --- diff --git a/views/front/members/detail.html b/views/front/members/detail.html index ccb3a384..810f70ca 100644 --- a/views/front/members/detail.html +++ b/views/front/members/detail.html @@ -435,31 +435,31 @@ 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); diff --git a/views/front/members/list.html b/views/front/members/list.html index da2e473c..ac7929f2 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -475,28 +475,28 @@ 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}