query: embed.html##defaultView:Map{"hide": ["?location", "?layer"]}
  SELECT ?item  ?itemLabel ?location ?layer ?nearestitemLabel ?nearestitem
  WITH {
    SELECT ?bookcase ?location1 (MIN(?distance) AS ?minDistance) WHERE {
      ?bookcase wdt:P31 wd:Q294297;
                wdt:P625 ?location1;
               wdt:P131 wd:Q1741.
      ?library wdt:P31 wd:Q28564;
               wdt:P625 ?location2;
               wdt:P131 wd:Q1741.
      BIND(geof:distance(?location1, ?location2) AS ?distance)
    }
    GROUP BY ?bookcase ?location1
  } AS %bookcasesWithDistance
  WITH {
    SELECT ?bookcase ?location1 ?library ?location2 ?distance WHERE {
      INCLUDE %bookcasesWithDistance.
      ?library wdt:P31 wd:Q28564;
               wdt:P625 ?location2;
               wdt:P131 wd:Q1741.
      BIND(geof:distance(?location1, ?location2) AS ?distance)
      FILTER(?distance = ?minDistance)
    }
  } AS %bookcasesWithLibraries
  WHERE {
    INCLUDE %bookcasesWithLibraries.
    VALUES ?switch { true false }
    BIND(IF(?switch, "Bücherschrank"@de, "Bibliothek"@de) AS ?layer)
    BIND(IF(?switch, ?bookcase, ?library) AS ?item)
    BIND(IF(?switch, ?location1, ?location2) AS ?location)
    BIND(IF(?switch, ?library, ?bookcase) AS ?nearestitem)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de". }
  }