Code Monkey home page Code Monkey logo

Comments (7)

mwingler avatar mwingler commented on September 24, 2024 2

Hi @zarov,

thanks for the information.
As a workaround I solved this by adding the line as a simple THREE.Line:

var geometry = new THREE.Geometry();
for (const point of linePoints) {
const currentPoint = new itowns.Coordinates(EPSG_4326, point.longitude, point.latitude, point.altitude).as(EPSG_4978);
geometry.vertices.push(new THREE.Vector3(currentPoint.x(), currentPoint.y(), currentPoint.z()));
}
var material = new THREE.LineBasicMaterial({ color: 0xff0000});
var theLine= new THREE.Line(geometry, material);
view.scene.add(theLine);

This line doesn't disappear when zooming in. 👍

from itowns.github.io.

Death111 avatar Death111 commented on September 24, 2024 1

If we hide the globe the line appears:
grafik
Show it again:
grafik

from itowns.github.io.

zarov avatar zarov commented on September 24, 2024

Hello ! I would qualify this as a bug: the mesh of surface is getting more refined when zooming in, but this is not the case for the GPX path. If we had a more precised GPX path we could solve this problem, but unfortunately this is not the case.

from itowns.github.io.

mwingler avatar mwingler commented on September 24, 2024

Hello @zarov ,

thanks for your reply!
Is there a way (maybe over Three.js) to manually refine the surface of the GPX path?

Or do you know any other (simple) way of drawing a line from an array of coordinates on the GlobeView surface?

from itowns.github.io.

zarov avatar zarov commented on September 24, 2024

Is there a way (maybe over Three.js) to manually refine the surface of the GPX path?

I think you could split the GPX path into segments shorter than vertices of the layer level 20 (well for the case of France, I don't know what you are using), then recompute the altitude of each point using DEMUtils and redraw the GPX path. I didn't test it, but it seems plausible.

Or do you know any other (simple) way of drawing a line from an array of coordinates on the GlobeView surface?

Yes, you can, instead of displaying a GeometryLayer, display a ColorLayer: see here for example

If we hide the globe the line appears [...]

This is a known problem unfortunately, but I think it has to do with the previous issues.

FIY, you shouldn't use the current GpxParser that only gives a specific output, and is not really usable after. I hope to have time to change it some time soon.

from itowns.github.io.

wOOx92 avatar wOOx92 commented on September 24, 2024

Thx @mwingler - this worked for me!

from itowns.github.io.

zarov avatar zarov commented on September 24, 2024

Ok, good to know it's working, thanks !

from itowns.github.io.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.