Skip to content

Commit

Permalink
Also make suggestions for geo:hasCentroid/geo:asWKT
Browse files Browse the repository at this point in the history
When `geo:hasGeometry` is among the predicate suggestions, the QLever UI
also suggests `geo:hasGeometry/geo:asWKT`. This feature is now extended
to `geo:hasCentroid`. This new predicate has been introduced by
ad-freiburg/osm2rdf@d39d297
  • Loading branch information
Hannah Bast committed Sep 25, 2024
1 parent 9f39f84 commit d39370c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/static/js/codemirror/modes/sparql/sparql-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -939,10 +939,11 @@ function getQleverSuggestions(
altname: altEntityName,
isMixedModeSuggestion: !takeMainQueryResult
});
} else if (displayText == "geo:hasGeometry ") {
} else if (displayText == "geo:hasGeometry " || displayText == "geo:hasCentroid ") {
displayTextWithoutSpaces = displayText.replace(/ /g, "");
dynamicSuggestions.push({
displayText: "geo:hasGeometry/geo:asWKT ",
completion: "geo:hasGeometry/geo:asWKT ",
displayText: displayTextWithoutSpaces + "/geo:asWKT ",
completion: displayTextWithoutSpaces + "/geo:asWKT ",
name: "geometry as WKT",
altname: altEntityName,
isMixedModeSuggestion: !takeMainQueryResult
Expand Down

0 comments on commit d39370c

Please sign in to comment.