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

Is it possible to get (visible) Marker x and y for annotation? #13

Closed
jjwallace opened this issue Jun 27, 2019 · 2 comments
Closed

Is it possible to get (visible) Marker x and y for annotation? #13

jjwallace opened this issue Jun 27, 2019 · 2 comments
Labels
question Further information is requested

Comments

@jjwallace
Copy link

image

Is it possible to get visible marker (window) x and y locations to draw annotations? From what im looking at this is collected with the mouse x and y for tooltip. It would be really neat to have labels or tool tips active all the time. I would like to look into this and build a prototype, which direction do I go?

@chrisrzhou
Copy link
Owner

Hi @jjwallace, currently this is not supported and might not be easy to accomplish since the event data is captured on various events that three.interaction library supports. Theoretically, if we hold all the three marker objects in memory, we can keep track of the three objects and expose them with an onAnimate callback in the component prop that captures this everytime requestAnimationFrame runs.

I'm a little hesitant going with this approach. There's another way to accomplish this if you would like. If you would like to render annotations to the globe, you can implement a custom markerOptions.renderer that renders a Three object to the marker. Doing this is slightly beneficial for now since there would be no need to introduce code complexity to the project, and you can rely on react-globe to position and render the custom marker (with annotation) on the globe.

Let me know if this works, and sorry for the delayed response!

@jjwallace
Copy link
Author

Wow that might be pretty neat. I will take a look at that approach. Thank you for the reply.

@chrisrzhou chrisrzhou added the question Further information is requested label Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants