GithubHelp home page GithubHelp logo

Comments (9)

nzjony avatar nzjony commented on August 22, 2024

hi @HHammerite thanks again for your issue and engagement in our project! You can see how we translate geocoordinates to world positions in the function: projectPoint. For example if you look at the MercatorProjection implementation, then the longitude is put in the x coordinate, the latitude in the y, and the altitude in the z component. If you look at the surfaceNormal you will also see that for the MercatorProjection you get the vector 0,0,1. So, if you add to the z component of an object I would expect it to have some altitude as you see in your example. Did I understand your problem correctly?

from harp.gl.

harrycollin avatar harrycollin commented on August 22, 2024

Hi @nzjony, thanks again for your fast response. I believe you've understood it :) I must admit I don't fully understand your comment. Was it by design that the coordinates lat, long are on the X & Y axis?

from harp.gl.

nzjony avatar nzjony commented on August 22, 2024

@HHammerite , no worries, we also have a slack space if you want a quicker response: https://heredev.slack.com/messages/harpgl/. TBH I don't know exactly, I think it is because most planar projections project latitude / longitude to x / y, and to support 3D we just add the z component. It would be possible to swap, y and z, but then we would need to have different code for projection, so this is the easiest way to support both use cases.

from harp.gl.

harrycollin avatar harrycollin commented on August 22, 2024

@nzjony Thank you for the slack invitation, however I can't join and get prompted to contact an admin. As for the X/Y projection it makes sense if the majority of projections use that system.

I've managed to work around it for the moment. I found this issue whilst I was trying to set the MapView.pointOfView camera's (orbit camera) up to (0, 0, 1), allowing me to orbit a MapAnchor in a natural way. It was only until I added the camera to the MapView.mapAnchors node that this worked and I was able to use orbit controls normally.

^^ That part was a little un-related but someone else might find it useful.

Could I get an invitation to the slack workspace?

from harp.gl.

nzjony avatar nzjony commented on August 22, 2024

@HHammerite , opps, I used the wrong link, try: http://t.her.is/slack.

Maybe this is an issue with the pointOfView, because when you set it, it should update automatically. My guess is that by adding it to the mapAnchors node, internally the matrices are updated, see: https://threejs.org/docs/#manual/en/introduction/How-to-update-things .

I will create an issue: #1377

from harp.gl.

harrycollin avatar harrycollin commented on August 22, 2024

@nzjony Thanks for the invitation! As for the camera controls, it was behaving really strange, I do recall updating the matrices on it with no luck. However, I will try again with the instructions on the link you sent.

from harp.gl.

harrycollin avatar harrycollin commented on August 22, 2024

@nzjony It turns out the adding the camera to mapAnchors wasn't related to the issue at hand. I hope I didn't create a witchhunt for something that might not exist :/ I'm not entirely sure what was happening if I have to be honest.

from harp.gl.

harrycollin avatar harrycollin commented on August 22, 2024

Feel free to close this issue if there is nothing else to be added here :)

from harp.gl.

nzjony avatar nzjony commented on August 22, 2024

@HHammerite , all good, I was also recently using the MapView.pointOfView in #1224 and had some issues, so I think it is still worth investigating how we can make the interface easier to use, it is definitely a cool debug feature.

thanks again for your interest in harp.gl and I will close this issue.

from harp.gl.

Related Issues (20)

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.