§4.1.24.3 R24: map marker tooltip label = IATA code, not city name
TZ §4.1.24.3 line 3098: "всплывающая подсказка с кодом аэропорта". The marker `label` now uses `city.code` (IATA city code) instead of the human-readable city name. On hover, Leaflet's tooltip shows the code.
This commit is contained in:
@@ -243,7 +243,10 @@ export const FlightsMapStartPage: FC<FlightsMapStartPageProps> = ({
|
|||||||
id: city.code,
|
id: city.code,
|
||||||
lat: city.location.lat,
|
lat: city.location.lat,
|
||||||
lng: city.location.lon,
|
lng: city.location.lon,
|
||||||
label: city.name,
|
// TZ §4.1.24.3 R24: hover tooltip shows the IATA airport code, not
|
||||||
|
// the city name. The city code doubles as IATA here since our
|
||||||
|
// dictionaries use IATA city codes (MOW, LED, …).
|
||||||
|
label: city.code,
|
||||||
tooltipPermanent: true,
|
tooltipPermanent: true,
|
||||||
style: isHighlighted ? "orange" : "blue-small",
|
style: isHighlighted ? "orange" : "blue-small",
|
||||||
zoomLevel: getCityZoomLevel(city.code),
|
zoomLevel: getCityZoomLevel(city.code),
|
||||||
@@ -294,8 +297,9 @@ export const FlightsMapStartPage: FC<FlightsMapStartPageProps> = ({
|
|||||||
const arrCity = dictionaries.cityByCode.get(arrCityCode);
|
const arrCity = dictionaries.cityByCode.get(arrCityCode);
|
||||||
if (!depCity || !arrCity) return [];
|
if (!depCity || !arrCity) return [];
|
||||||
|
|
||||||
const date = filterState.date ?? todayYyyymmdd();
|
// TZ §4.1.24.6: When no date is set, SB transition must be performed
|
||||||
const buyUrl = buildBuyTicketUrl(depCityCode, arrCityCode, date);
|
// without a date. Pass filterState.date directly (may be undefined).
|
||||||
|
const buyUrl = buildBuyTicketUrl(depCityCode, arrCityCode, filterState.date);
|
||||||
|
|
||||||
const depHtml = `
|
const depHtml = `
|
||||||
<div class="popup-header-test"><span>${escapeHtml(depCity.name)}</span></div>
|
<div class="popup-header-test"><span>${escapeHtml(depCity.name)}</span></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user