Skip to content

Thumbnail image and map pin can represent different countries for transnational/serial properties #387

Description

@zigzagdev

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)

  1. 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
  2. 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

  • Decide whether the fix lives in world-heritage-api (data/schema), world-heritage-frontend (rendering), or both.
  • For a given heritage detail page, the country implied by the thumbnail and the country implied by the map pin are consistent with each other (and ideally with country/primary_state_party_code).
  • Verify against id 1321 and audit other multi-country serial properties for the same mismatch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions