Comments (7)
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.
If we hide the globe the line appears:
Show it again:
from itowns.github.io.
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.
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.
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.
Thx @mwingler - this worked for me!
from itowns.github.io.
Ok, good to know it's working, thanks !
from itowns.github.io.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from itowns.github.io.