2022-11-22 22:19:10 +00:00
|
|
|
import { json } from './modules/utils/fetch.mjs';
|
2022-12-06 22:14:56 +00:00
|
|
|
import noSleep from './modules/utils/nosleep.mjs';
|
|
|
|
import {
|
|
|
|
message as navMessage, isPlaying, resize, resetStatuses, latLonReceived, stopAutoRefreshTimer, registerRefreshData,
|
|
|
|
} from './modules/navigation.mjs';
|
2022-12-12 20:47:53 +00:00
|
|
|
import { round2 } from './modules/utils/units.mjs';
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
init();
|
|
|
|
});
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
let fullScreenOverride = false;
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
const categories = [
|
|
|
|
'Land Features',
|
|
|
|
'Bay', 'Channel', 'Cove', 'Dam', 'Delta', 'Gulf', 'Lagoon', 'Lake', 'Ocean', 'Reef', 'Reservoir', 'Sea', 'Sound', 'Strait', 'Waterfall', 'Wharf', // Water Features
|
|
|
|
'Amusement Park', 'Historical Monument', 'Landmark', 'Tourist Attraction', 'Zoo', // POI/Arts and Entertainment
|
|
|
|
'College', // POI/Education
|
|
|
|
'Beach', 'Campground', 'Golf Course', 'Harbor', 'Nature Reserve', 'Other Parks and Outdoors', 'Park', 'Racetrack',
|
|
|
|
'Scenic Overlook', 'Ski Resort', 'Sports Center', 'Sports Field', 'Wildlife Reserve', // POI/Parks and Outdoors
|
|
|
|
'Airport', 'Ferry', 'Marina', 'Pier', 'Port', 'Resort', // POI/Travel
|
|
|
|
'Postal', 'Populated Place',
|
|
|
|
];
|
2022-12-08 21:05:51 +00:00
|
|
|
const category = categories.join(',');
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
const init = () => {
|
|
|
|
document.getElementById('txtAddress').addEventListener('focus', (e) => {
|
|
|
|
e.target.select();
|
|
|
|
});
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
registerRefreshData(loadData);
|
2022-12-06 22:14:56 +00:00
|
|
|
|
2022-11-22 16:45:17 +00:00
|
|
|
document.getElementById('NavigateMenu').addEventListener('click', btnNavigateMenuClick);
|
|
|
|
document.getElementById('NavigateRefresh').addEventListener('click', btnNavigateRefreshClick);
|
|
|
|
document.getElementById('NavigateNext').addEventListener('click', btnNavigateNextClick);
|
|
|
|
document.getElementById('NavigatePrevious').addEventListener('click', btnNavigatePreviousClick);
|
|
|
|
document.getElementById('NavigatePlay').addEventListener('click', btnNavigatePlayClick);
|
|
|
|
document.getElementById('ToggleFullScreen').addEventListener('click', btnFullScreenClick);
|
2022-12-13 21:43:06 +00:00
|
|
|
const btnGetGps = document.getElementById('btnGetGps');
|
|
|
|
btnGetGps.addEventListener('click', btnGetGpsClick);
|
|
|
|
if (!navigator.geolocation) btnGetGps.style.display = 'none';
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
document.getElementById('divTwc').addEventListener('click', () => {
|
2022-12-12 20:47:53 +00:00
|
|
|
if (document.fullscreenElement) updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
});
|
|
|
|
|
2022-12-21 22:20:31 +00:00
|
|
|
document.getElementById('txtAddress').addEventListener('keydown', (key) => { if (key.code === 'Enter') formSubmit(); });
|
|
|
|
document.getElementById('btnGetLatLng').addEventListener('click', () => formSubmit());
|
|
|
|
|
2022-11-22 16:45:17 +00:00
|
|
|
document.addEventListener('keydown', documentKeydown);
|
2022-12-12 20:47:53 +00:00
|
|
|
document.addEventListener('touchmove', (e) => { if (fullScreenOverride) e.preventDefault(); });
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-21 22:20:31 +00:00
|
|
|
$('#txtAddress').devbridgeAutocomplete({
|
2022-11-22 16:45:17 +00:00
|
|
|
serviceUrl: 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest',
|
|
|
|
deferRequestBy: 300,
|
|
|
|
paramName: 'text',
|
|
|
|
params: {
|
|
|
|
f: 'json',
|
|
|
|
countryCode: 'USA', // 'USA,PRI,VIR,GUM,ASM',
|
2022-12-08 21:05:51 +00:00
|
|
|
category,
|
2022-11-22 16:45:17 +00:00
|
|
|
maxSuggestions: 10,
|
|
|
|
},
|
|
|
|
dataType: 'json',
|
2022-12-12 20:13:39 +00:00
|
|
|
transformResult: (response) => ({
|
2022-12-12 20:47:53 +00:00
|
|
|
suggestions: response.suggestions.map((i) => ({
|
2022-12-12 20:13:39 +00:00
|
|
|
value: i.text,
|
|
|
|
data: i.magicKey,
|
|
|
|
})),
|
|
|
|
}),
|
2022-11-22 16:45:17 +00:00
|
|
|
minChars: 3,
|
|
|
|
showNoSuggestionNotice: true,
|
|
|
|
noSuggestionNotice: 'No results found. Please try a different search string.',
|
|
|
|
onSelect(suggestion) { autocompleteOnSelect(suggestion, this); },
|
|
|
|
width: 490,
|
|
|
|
});
|
|
|
|
|
2022-12-21 22:20:31 +00:00
|
|
|
const formSubmit = () => {
|
|
|
|
const ac = $('#txtAddress').devbridgeAutocomplete();
|
2022-12-12 20:47:53 +00:00
|
|
|
if (ac.suggestions[0]) $(ac.suggestionsContainer.children[0]).trigger('click');
|
2022-11-22 16:45:17 +00:00
|
|
|
return false;
|
2022-12-21 22:20:31 +00:00
|
|
|
};
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
// Auto load the previous query
|
2022-12-12 20:47:53 +00:00
|
|
|
const query = localStorage.getItem('latLonQuery');
|
2022-12-13 21:43:06 +00:00
|
|
|
const latLon = localStorage.getItem('latLon');
|
|
|
|
const fromGPS = localStorage.getItem('latLonFromGPS');
|
|
|
|
if (query && latLon && !fromGPS) {
|
2022-11-22 16:45:17 +00:00
|
|
|
const txtAddress = document.getElementById('txtAddress');
|
2022-12-12 20:47:53 +00:00
|
|
|
txtAddress.value = query;
|
|
|
|
loadData(JSON.parse(latLon));
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
2022-12-13 21:43:06 +00:00
|
|
|
if (fromGPS) {
|
|
|
|
btnGetGpsClick();
|
|
|
|
}
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-14 22:28:33 +00:00
|
|
|
const play = localStorage.getItem('play');
|
|
|
|
if (play === null || play === 'true') postMessage('navButton', 'play');
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
document.getElementById('btnClearQuery').addEventListener('click', () => {
|
|
|
|
document.getElementById('spanCity').innerHTML = '';
|
|
|
|
document.getElementById('spanState').innerHTML = '';
|
|
|
|
document.getElementById('spanStationId').innerHTML = '';
|
|
|
|
document.getElementById('spanRadarId').innerHTML = '';
|
|
|
|
document.getElementById('spanZoneId').innerHTML = '';
|
|
|
|
|
|
|
|
document.getElementById('chkAutoRefresh').checked = true;
|
2022-12-12 20:47:53 +00:00
|
|
|
localStorage.removeItem('autoRefresh');
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
localStorage.removeItem('play');
|
2022-11-22 16:45:17 +00:00
|
|
|
postMessage('navButton', 'play');
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
localStorage.removeItem('latLonQuery');
|
2022-12-13 21:43:06 +00:00
|
|
|
localStorage.removeItem('latLon');
|
|
|
|
localStorage.removeItem('latLonFromGPS');
|
|
|
|
document.getElementById('btnGetGps').classList.remove('active');
|
2022-11-22 16:45:17 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// swipe functionality
|
|
|
|
document.getElementById('container').addEventListener('swiped-left', () => swipeCallBack('left'));
|
|
|
|
document.getElementById('container').addEventListener('swiped-right', () => swipeCallBack('right'));
|
|
|
|
};
|
|
|
|
|
|
|
|
const autocompleteOnSelect = async (suggestion, elem) => {
|
|
|
|
// Do not auto get the same city twice.
|
|
|
|
if (elem.previousSuggestionValue === suggestion.value) return;
|
|
|
|
|
2022-12-12 20:13:39 +00:00
|
|
|
const data = await json('https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find', {
|
|
|
|
data: {
|
|
|
|
text: suggestion.value,
|
|
|
|
magicKey: suggestion.data,
|
|
|
|
f: 'json',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const loc = data.locations[0];
|
|
|
|
if (loc) {
|
2022-12-13 22:31:18 +00:00
|
|
|
localStorage.removeItem('latLonFromGPS');
|
|
|
|
document.getElementById('btnGetGps').classList.remove('active');
|
2022-12-12 20:13:39 +00:00
|
|
|
doRedirectToGeometry(loc.feature.geometry);
|
2022-11-22 16:45:17 +00:00
|
|
|
} else {
|
2022-12-12 20:13:39 +00:00
|
|
|
console.error('An unexpected error occurred. Please try a different search string.');
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
const doRedirectToGeometry = (geom, haveDataCallback) => {
|
2022-12-12 20:47:53 +00:00
|
|
|
const latLon = { lat: round2(geom.y, 4), lon: round2(geom.x, 4) };
|
2022-11-22 16:45:17 +00:00
|
|
|
// Save the query
|
2022-12-12 20:47:53 +00:00
|
|
|
localStorage.setItem('latLonQuery', document.getElementById('txtAddress').value);
|
2022-12-13 21:43:06 +00:00
|
|
|
localStorage.setItem('latLon', JSON.stringify(latLon));
|
2022-12-12 20:13:39 +00:00
|
|
|
|
|
|
|
// get the data
|
2022-12-13 21:43:06 +00:00
|
|
|
loadData(latLon, haveDataCallback);
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const btnFullScreenClick = () => {
|
|
|
|
if (!document.fullscreenElement) {
|
2022-12-12 20:47:53 +00:00
|
|
|
enterFullScreen();
|
2022-11-22 16:45:17 +00:00
|
|
|
} else {
|
2022-12-12 20:47:53 +00:00
|
|
|
exitFullscreen();
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
|
|
|
|
2022-12-06 22:14:56 +00:00
|
|
|
if (isPlaying()) {
|
2022-11-22 16:45:17 +00:00
|
|
|
noSleep(true);
|
|
|
|
} else {
|
|
|
|
noSleep(false);
|
|
|
|
}
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
const enterFullScreen = () => {
|
2022-11-22 16:45:17 +00:00
|
|
|
const element = document.getElementById('divTwc');
|
|
|
|
|
|
|
|
// Supports most browsers and their versions.
|
|
|
|
const requestMethod = element.requestFullScreen || element.webkitRequestFullScreen
|
|
|
|
|| element.mozRequestFullScreen || element.msRequestFullscreen;
|
|
|
|
|
|
|
|
if (requestMethod) {
|
|
|
|
// Native full screen.
|
|
|
|
requestMethod.call(element, { navigationUI: 'hide' }); // https://bugs.chromium.org/p/chromium/issues/detail?id=933436#c7
|
|
|
|
} else {
|
|
|
|
// iOS doesn't support FullScreen API.
|
|
|
|
window.scrollTo(0, 0);
|
2022-12-12 20:47:53 +00:00
|
|
|
fullScreenOverride = true;
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
2022-12-06 22:14:56 +00:00
|
|
|
resize();
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-07 21:36:02 +00:00
|
|
|
// change hover text and image
|
|
|
|
const img = document.getElementById('ToggleFullScreen');
|
2022-12-19 21:21:38 +00:00
|
|
|
img.src = 'images/nav/ic_fullscreen_exit_white_24dp_2x.png';
|
2022-12-07 21:36:02 +00:00
|
|
|
img.title = 'Exit fullscreen';
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
const exitFullscreen = () => {
|
2022-11-22 16:45:17 +00:00
|
|
|
// exit full-screen
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
if (fullScreenOverride) {
|
|
|
|
fullScreenOverride = false;
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (document.exitFullscreen) {
|
|
|
|
// Chrome 71 broke this if the user pressed F11 to enter full screen mode.
|
|
|
|
document.exitFullscreen();
|
|
|
|
} else if (document.webkitExitFullscreen) {
|
|
|
|
document.webkitExitFullscreen();
|
|
|
|
} else if (document.mozCancelFullScreen) {
|
|
|
|
document.mozCancelFullScreen();
|
|
|
|
} else if (document.msExitFullscreen) {
|
|
|
|
document.msExitFullscreen();
|
|
|
|
}
|
2022-12-06 22:14:56 +00:00
|
|
|
resize();
|
2022-12-07 21:36:02 +00:00
|
|
|
// change hover text and image
|
|
|
|
const img = document.getElementById('ToggleFullScreen');
|
2022-12-19 21:21:38 +00:00
|
|
|
img.src = 'images/nav/ic_fullscreen_white_24dp_2x.png';
|
2022-12-07 21:36:02 +00:00
|
|
|
img.title = 'Enter fullscreen';
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const btnNavigateMenuClick = () => {
|
|
|
|
postMessage('navButton', 'menu');
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
const loadData = (_latLon, haveDataCallback) => {
|
2022-11-22 16:45:17 +00:00
|
|
|
// if latlon is provided store it locally
|
2022-12-12 20:47:53 +00:00
|
|
|
if (_latLon) loadData.latLon = _latLon;
|
2022-11-22 16:45:17 +00:00
|
|
|
// get the data
|
2022-12-12 20:47:53 +00:00
|
|
|
const { latLon } = loadData;
|
2022-11-22 16:45:17 +00:00
|
|
|
// if there's no data stop
|
|
|
|
if (!latLon) return;
|
|
|
|
|
|
|
|
document.getElementById('txtAddress').blur();
|
2022-12-06 22:14:56 +00:00
|
|
|
stopAutoRefreshTimer();
|
2022-12-13 21:43:06 +00:00
|
|
|
latLonReceived(latLon, haveDataCallback);
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const swipeCallBack = (direction) => {
|
|
|
|
switch (direction) {
|
|
|
|
case 'left':
|
|
|
|
btnNavigateNextClick();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'right':
|
|
|
|
default:
|
|
|
|
btnNavigatePreviousClick();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const btnNavigateRefreshClick = () => {
|
2022-12-06 22:14:56 +00:00
|
|
|
resetStatuses();
|
2022-12-12 20:47:53 +00:00
|
|
|
loadData();
|
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
const btnNavigateNextClick = () => {
|
|
|
|
postMessage('navButton', 'next');
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
const btnNavigatePreviousClick = () => {
|
|
|
|
postMessage('navButton', 'previous');
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
let navigateFadeIntervalId = null;
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
const updateFullScreenNavigate = () => {
|
2022-11-22 16:45:17 +00:00
|
|
|
document.activeElement.blur();
|
|
|
|
document.getElementById('divTwcBottom').classList.remove('hidden');
|
|
|
|
document.getElementById('divTwcBottom').classList.add('visible');
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
if (navigateFadeIntervalId) {
|
|
|
|
clearTimeout(navigateFadeIntervalId);
|
|
|
|
navigateFadeIntervalId = null;
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
|
|
|
|
2022-12-12 20:47:53 +00:00
|
|
|
navigateFadeIntervalId = setTimeout(() => {
|
2022-11-22 16:45:17 +00:00
|
|
|
if (document.fullscreenElement) {
|
|
|
|
document.getElementById('divTwcBottom').classList.remove('visible');
|
|
|
|
document.getElementById('divTwcBottom').classList.add('hidden');
|
|
|
|
}
|
|
|
|
}, 2000);
|
|
|
|
};
|
|
|
|
|
|
|
|
const documentKeydown = (e) => {
|
2022-12-19 17:48:59 +00:00
|
|
|
const { key } = e;
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
if (document.fullscreenElement || document.activeElement === document.body) {
|
2022-12-19 17:48:59 +00:00
|
|
|
switch (key) {
|
|
|
|
case ' ': // Space
|
|
|
|
// don't scroll
|
|
|
|
e.preventDefault();
|
2022-11-22 16:45:17 +00:00
|
|
|
btnNavigatePlayClick();
|
|
|
|
return false;
|
|
|
|
|
2022-12-19 17:48:59 +00:00
|
|
|
case 'ArrowRight':
|
|
|
|
case 'PageDown':
|
|
|
|
// don't scroll
|
|
|
|
e.preventDefault();
|
2022-11-22 16:45:17 +00:00
|
|
|
btnNavigateNextClick();
|
|
|
|
return false;
|
|
|
|
|
2022-12-19 17:48:59 +00:00
|
|
|
case 'ArrowLeft':
|
|
|
|
case 'PageUp':
|
|
|
|
// don't scroll
|
|
|
|
e.preventDefault();
|
2022-11-22 16:45:17 +00:00
|
|
|
btnNavigatePreviousClick();
|
|
|
|
return false;
|
|
|
|
|
2022-12-19 17:48:59 +00:00
|
|
|
case 'ArrowUp': // Home
|
|
|
|
e.preventDefault();
|
2022-11-22 16:45:17 +00:00
|
|
|
btnNavigateMenuClick();
|
|
|
|
return false;
|
|
|
|
|
2022-12-19 17:48:59 +00:00
|
|
|
case '0': // "O" Restart
|
2022-11-22 16:45:17 +00:00
|
|
|
btnNavigateRefreshClick();
|
|
|
|
return false;
|
|
|
|
|
2022-12-19 17:48:59 +00:00
|
|
|
case 'F':
|
|
|
|
case 'f':
|
2022-11-22 16:45:17 +00:00
|
|
|
btnFullScreenClick();
|
|
|
|
return false;
|
|
|
|
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
const btnNavigatePlayClick = () => {
|
|
|
|
postMessage('navButton', 'playToggle');
|
2022-12-12 20:47:53 +00:00
|
|
|
updateFullScreenNavigate();
|
2022-11-22 16:45:17 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
// post a message to the iframe
|
|
|
|
const postMessage = (type, myMessage = {}) => {
|
2022-12-06 22:14:56 +00:00
|
|
|
navMessage({ type, message: myMessage });
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
const getPosition = async () => new Promise((resolve) => {
|
|
|
|
navigator.geolocation.getCurrentPosition(resolve);
|
|
|
|
});
|
|
|
|
|
2022-11-22 16:45:17 +00:00
|
|
|
const btnGetGpsClick = async () => {
|
|
|
|
if (!navigator.geolocation) return;
|
2022-12-13 21:43:06 +00:00
|
|
|
const btn = document.getElementById('btnGetGps');
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
// toggle first
|
|
|
|
if (btn.classList.contains('active')) {
|
|
|
|
btn.classList.remove('active');
|
|
|
|
localStorage.removeItem('latLonFromGPS');
|
|
|
|
return;
|
2022-11-22 16:45:17 +00:00
|
|
|
}
|
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
// set gps active
|
|
|
|
btn.classList.add('active');
|
2022-11-22 16:45:17 +00:00
|
|
|
|
2022-12-13 21:43:06 +00:00
|
|
|
// get position
|
|
|
|
const position = await getPosition();
|
|
|
|
const { latitude, longitude } = position.coords;
|
|
|
|
|
|
|
|
const txtAddress = document.getElementById('txtAddress');
|
|
|
|
txtAddress.value = `${round2(latitude, 4)}, ${round2(longitude, 4)}`;
|
|
|
|
|
|
|
|
doRedirectToGeometry({ y: latitude, x: longitude }, (point) => {
|
|
|
|
const location = point.properties.relativeLocation.properties;
|
|
|
|
// Save the query
|
|
|
|
const query = `${location.city}, ${location.state}`;
|
|
|
|
localStorage.setItem('latLon', JSON.stringify({ lat: latitude, lon: longitude }));
|
|
|
|
localStorage.setItem('latLonQuery', query);
|
|
|
|
localStorage.setItem('latLonFromGPS', true);
|
|
|
|
txtAddress.value = `${location.city}, ${location.state}`;
|
|
|
|
});
|
2022-11-22 16:45:17 +00:00
|
|
|
};
|