Hey,
I'm not very knowledgeable (*he*he*he) in Arcgis / Esri JS API. Basically I'am learning ArcGis knowledge and I am trying to add my knowledge Graph to a Web APP using snowpack (API 4.27.6)
=> Inspired by this ( https://www.esri.com/arcgis-blog/products/arcgis-knowledge/analytics/use-a-web-app-to-visualize-a-fa...)
So far I managed to add my Entities to a Map using the Knowledge Layer / Sublayer and a Point renderer. I have now been trying to add the relationships as lines, but this turns out to be less straight forward than I was hoping... As far as I understand this: The relationships cannot be added using a line renderer through the method I used for the points... so... get the point realtionships and coordinates and render a line?
=> Using "MATCH q = (a)-->()-->(c) RETURN q LIMIT 1"
with the REST Service directory gives the Information I need (Coordinates, origin Id, destination ID etc.).... using it here:
const knowlegeGraph = await knowledgeGraphService.fetchKnowledgeGraph(url)
const results = await knowledgeGraphService.executeQuery(
knowlegeGraph,
{
openCypherQuery: "MATCH q = (a)-->()-->(b) RETURN q LIMIT 1",
}
)
does not ??
The path result contains a mostly empty properties array and no spatial references... do I have to add them to my entity types manually ??
The coordinates have to exist somewhere, I mean the points are rendered correctly, though I could not find them inside a console.log() of the sublayers either 😞
The data is very simple: one entity type with entities (I have generated them by placing each one on a Map in Pro), related through one type of relationship
Is there a better way to do this? Sorry for the amateur question, would be thankfull for some clues tho!