<a id="glmMapSetMyLocation" class="button button-secondary glm-member-button-small glm-hidden">Set My Location Here</a>
<a id="glmMapGoToMyLocation" class="button button-secondary glm-member-button-small">Return to My Location</a>
<a id="glmMapBack" class="button button-secondary glm-member-button-small glm-hidden">Back to previous map location</a>
- <span id="glmMapReload" class="glm-hidden glm-right">Loading ...</span>
+ <span id="glmMapReload" class="glm-hidden">Loading ...</span>
</div>
<div id="glm-nearmeMap" class="glm-map-tall">(map loads here)</div>
<div id="glm-mapLegend" style="margin: .4em;">
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')
var geolocationFailCounter = 0;
var stopGeolocation = false;
var noProcessAfterZoom = false;
+
function initMap() {
content: 'My Selected Location'
});
mapTitle.open(map, this);
-
+
+
});
myMarker.addListener('mouseout', function() {
}
mapTitle.close();
checkNewPOIs();
+
});
myMarker.addListener('dragstart', function() {
dragging = true;
mapTitle.close();
window.clearTimeout(boundsDelayTimer);
+
});
myMarker.addListener('dragend', function() {
dragging = false;
checkNewPOIs();
+
});
// Request update for points of interest when map dragging stops.
if (trackToConsole) { console.log('GLM NearMe: map dragend'); }
checkNewPOIs();
+
});
// Request update for points of interest when map zoom changes.
// Set timer to get POIs
boundsDelayTimer = window.setTimeout(getBoundsPOIs, timeout, resetPOIs, anywhere);
-
+
}
/*
* 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();
if (trackToConsole) { console.log('GLM NearMe: No map change, aborting getBoundsPOIs()'); }
hideLoadingMsg();
+
return;
}
});
mapTitle.open(map, this);
-
+
});
marker.addListener('mouseout', function() {
// Add a click listener for this marker
marker.addListener('click', function() {
-
var infotext = '<h4 style="white-space: nowrap;">'+value.name+'</h4>';
var stateComma = '';
);
saveCurrentBounds();
-
+
}
// Save current bounds as last bounds