Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map component does not render correctly long distances #1047

Open
elizarp opened this issue Feb 27, 2025 · 0 comments
Open

Map component does not render correctly long distances #1047

elizarp opened this issue Feb 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@elizarp
Copy link

elizarp commented Feb 27, 2025

  • NeoDash version: v2.4.9-labs

  • Neo4j Database version: Aura Sandbox

  • Expected behavior
    If we consider the distance between Sao Paulo (Brazil) and Auckland (NZ) and compare this distance with the distance between Santiago (Chile) and Auckland (NZ), the first one if greater. However, the map component is rendering the relationship between the cities in the "wrong" direction.

I used point.distance to calculate the distances.

Distance Sao Paulo > Auckland: 12,033,465.188858354 (greater)
Distance Santiago > Auckland: 9,680,687.387294235

  • Actual behavior
    I built the Cypher below to show the scenario
WITH 
  point({longitude: -70.673676, latitude: -33.447487}) AS pointSantiago,
  point({longitude: 174.763336, latitude: -36.848461}) AS pointAuckland,
  point({longitude: -46.6388 , latitude: -23.5489}) AS pointSaoPaulo
CALL apoc.create.vNode(['City'],{name:"Santiago",geo: pointSantiago}) YIELD node as nodeSantiago
CALL apoc.create.vNode(['City'],{name: "Auckland", geo: pointAuckland}) YIELD node as nodeAuckland
CALL apoc.create.vNode(['City'],{name: "Sao Paulo", geo: pointSaoPaulo}) YIELD node as nodeSaoPaulo
CALL apoc.create.vRelationship(nodeSantiago,'DISTANCE',{distance:point.distance(pointSantiago, pointAuckland) },nodeAuckland) YIELD rel as relS_A
CALL apoc.create.vRelationship(nodeSaoPaulo,'DISTANCE',{distance:point.distance(pointSaoPaulo, pointAuckland) },nodeAuckland) YIELD rel as relSP_A
RETURN nodeSantiago,nodeAuckland,nodeSaoPaulo,relS_A, relSP_A;

Distances screenshots:
Image
Image

@elizarp elizarp added the bug Something isn't working label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant