Description
For transnational/serial World Heritage properties (one property spread across multiple countries), the thumbnail image and the map pin shown on the detail page can depict different countries, which is confusing.
Example: id 1321 ("The Architectural Work of Le Corbusier...", 7 countries: ARG, BEL, CHE, DEU, FRA, IND, JPN).
thumbnail_url (main_image_url) → https://whc.unesco.org/document/140720, which depicts the Curutchet House in La Plata, Argentina.
latitude/longitude → 46.4684139, 6.8293361, which points to Switzerland.
country / primary_state_party_code → India (IND, marked is_primary: true).
So the same detail page shows three different countries depending on which field you look at (thumbnail → Argentina, map → Switzerland, country label → India).
Root cause (API side)
UNESCO's own dataset stores exactly one (latitude, longitude) pair per heritage site record, even for serial/transnational properties that span many countries and many physical locations. main_image_url/per-image data is independent of that single coordinate, so there's no guarantee they refer to the same sub-site or country. This is a data modeling limitation, not just a rendering bug — see world-heritage-api's world_heritage_sites table (single latitude/longitude columns) and WorldHeritageQueryService::getHeritageById.
Suggested direction (needs decision before implementing)
- Quick/cosmetic fix: when a property has multiple
state_party_codes, make both the thumbnail and the map consistently represent the primary_state_party_code (here, India) — i.e. prefer an image tagged/known to be from the primary country, and keep using the stored lat/lng but label it clearly (e.g. "Representative location: India" or similar), or
- Proper fix: extend the data model so each image (and ideally each sub-site) can carry its own country/coordinate, and let the frontend pick a coordinate that matches whichever image/country is currently displayed.
Related: #124 (single source of truth for image rendering), #127 (frontend rendering rules for thumbnail/gallery).
Acceptance Criteria
Description
For transnational/serial World Heritage properties (one property spread across multiple countries), the thumbnail image and the map pin shown on the detail page can depict different countries, which is confusing.
Example: id 1321 ("The Architectural Work of Le Corbusier...", 7 countries: ARG, BEL, CHE, DEU, FRA, IND, JPN).
thumbnail_url(main_image_url) →https://whc.unesco.org/document/140720, which depicts the Curutchet House in La Plata, Argentina.latitude/longitude→46.4684139, 6.8293361, which points to Switzerland.country/primary_state_party_code→ India (IND, markedis_primary: true).So the same detail page shows three different countries depending on which field you look at (thumbnail → Argentina, map → Switzerland, country label → India).
Root cause (API side)
UNESCO's own dataset stores exactly one
(latitude, longitude)pair per heritage site record, even for serial/transnational properties that span many countries and many physical locations.main_image_url/per-image data is independent of that single coordinate, so there's no guarantee they refer to the same sub-site or country. This is a data modeling limitation, not just a rendering bug — seeworld-heritage-api'sworld_heritage_sitestable (singlelatitude/longitudecolumns) andWorldHeritageQueryService::getHeritageById.Suggested direction (needs decision before implementing)
state_party_codes, make both the thumbnail and the map consistently represent theprimary_state_party_code(here, India) — i.e. prefer an image tagged/known to be from the primary country, and keep using the stored lat/lng but label it clearly (e.g. "Representative location: India" or similar), orRelated: #124 (single source of truth for image rendering), #127 (frontend rendering rules for thumbnail/gallery).
Acceptance Criteria
world-heritage-api(data/schema),world-heritage-frontend(rendering), or both.country/primary_state_party_code).