Simplify popups
This commit is contained in:
@@ -401,6 +401,7 @@ const APP = () => {
|
|||||||
map.getSource('cities').setData(geojson);
|
map.getSource('cities').setData(geojson);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const getCountryName = (code) => {
|
const getCountryName = (code) => {
|
||||||
try {
|
try {
|
||||||
const regionNames = new Intl.DisplayNames(['en'], { type: 'region' });
|
const regionNames = new Intl.DisplayNames(['en'], { type: 'region' });
|
||||||
@@ -542,7 +543,6 @@ const APP = () => {
|
|||||||
if (nearestDist < 300 && nearestIdx !== currentCityIndexRef.current) {
|
if (nearestDist < 300 && nearestIdx !== currentCityIndexRef.current) {
|
||||||
currentCityIndexRef.current = nearestIdx;
|
currentCityIndexRef.current = nearestIdx;
|
||||||
setCurrentCityIndex(nearestIdx);
|
setCurrentCityIndex(nearestIdx);
|
||||||
showCityPopup(cities[nearestIdx]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentProgress - lastFetchedDist > 2000) {
|
if (currentProgress - lastFetchedDist > 2000) {
|
||||||
|
|||||||
Reference in New Issue
Block a user