From e1408fcbf128656e91273932f47eb0c3547f21ee Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 16 Dec 2016 16:59:12 -0500 Subject: [PATCH] Moved "Loading..." message so it doesn't cause a problem for mobile. --- views/front/nearme/index.html | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/views/front/nearme/index.html b/views/front/nearme/index.html index c66a20d..b3c1a7f 100644 --- a/views/front/nearme/index.html +++ b/views/front/nearme/index.html @@ -20,7 +20,7 @@ Set My Location Here  Return to My Location  Back to previous map location  - Loading ... + Loading ...
(map loads here)
@@ -71,7 +71,7 @@ var refLon = {$refLon}; // Default location for My Location marker - Lon var maxAnywhereZoom = 14; // Max zoom in when doing anywhere search var boundsTimeout = 1500; // Time to wait after a map move or zoom before trying to load new POIs in milliseconds - var trackPositionInterval = 60000; // Time interval for getting user's current geolocation - 1 Min + var trackPositionInterval = 10000; // Time interval for getting user's current geolocation - 1 Min var highAccuracyPoisition = false; // Request high-accuracy user geolocation from user's device var postionTimeout = 15000; // Maximum amount of time we'll wait for geolocation result - 15 Sec var geolocationFailCount = 2; // Allow geolocation to fail this many times before switching to manual location settings ('set') @@ -126,6 +126,7 @@ var geolocationFailCounter = 0; var stopGeolocation = false; var noProcessAfterZoom = false; + function initMap() { @@ -199,7 +200,8 @@ content: 'My Selected Location' }); mapTitle.open(map, this); - + + }); myMarker.addListener('mouseout', function() { @@ -211,6 +213,7 @@ } mapTitle.close(); checkNewPOIs(); + }); myMarker.addListener('dragstart', function() { @@ -220,6 +223,7 @@ dragging = true; mapTitle.close(); window.clearTimeout(boundsDelayTimer); + }); myMarker.addListener('dragend', function() { @@ -228,6 +232,7 @@ dragging = false; checkNewPOIs(); + }); // Request update for points of interest when map dragging stops. @@ -236,6 +241,7 @@ if (trackToConsole) { console.log('GLM NearMe: map dragend'); } checkNewPOIs(); + }); // Request update for points of interest when map zoom changes. @@ -339,7 +345,7 @@ // Set timer to get POIs boundsDelayTimer = window.setTimeout(getBoundsPOIs, timeout, resetPOIs, anywhere); - + } /* @@ -351,7 +357,7 @@ * Not needed for type 'anywhere' - full reset is assumned */ function getBoundsPOIs(resetPOIs = false, anywhere = false) { - + if (trackToConsole) { console.log('GLM NearMe: getBoundsPOIs() '); } var searchText = $('#glmNearMeSearchText').val(); @@ -390,6 +396,7 @@ if (trackToConsole) { console.log('GLM NearMe: No map change, aborting getBoundsPOIs()'); } hideLoadingMsg(); + return; } @@ -565,7 +572,7 @@ if (trackToConsole) { console.log('GLM NearMe: Number of markers remaining = '+O }); mapTitle.open(map, this); - + }); marker.addListener('mouseout', function() { @@ -575,7 +582,6 @@ if (trackToConsole) { console.log('GLM NearMe: Number of markers remaining = '+O // Add a click listener for this marker marker.addListener('click', function() { - var infotext = '

'+value.name+'

'; var stateComma = ''; @@ -692,7 +698,7 @@ if (trackToConsole) { console.log('GLM NearMe: Number of markers remaining = '+O ); saveCurrentBounds(); - + } // Save current bounds as last bounds -- 2.17.1