From 9eb397c2a468740c6ffebed588696eed60a86e99 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 20 Jun 2016 08:43:35 -0400 Subject: [PATCH] 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. --- views/front/members/detail.html | 48 ++++++++++++++++----------------- views/front/members/list.html | 44 +++++++++++++++--------------- 2 files changed, 46 insertions(+), 46 deletions(-) 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} -- 2.17.1