Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Three line between two geopoints #2330

Answered by hugosoli
hugosoli asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, based on the recomendation of @nzjony I dig arround the projections classes. This solution work for me.

function drawLineBetween(poin1, point2) {
// let zocalo = new GeoCoordinates(19.4326018, -99.1332049);
const currentPosition = mapView.target;
const points = [];
points.push(mapView.projection.projectPoint(poin1));
points.push(mapView.projection.projectPoint(point2));
const geometryl = new THREE.BufferGeometry().setFromPoints(points);
const line = new THREE.Line(geometryl, lineMaterial);
line.anchor = new THREE.Vector3();
mapView.mapAnchors.add(line);
mapView.update();
}

cheers

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@hugosoli
Comment options

@nzjony
Comment options

Comment options

You must be logged in to vote
1 reply
@nzjony
Comment options

Answer selected by hugosoli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants