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

In examples tb is not defined . #105

Closed
ats1999 opened this issue Nov 25, 2020 · 7 comments
Closed

In examples tb is not defined . #105

ats1999 opened this issue Nov 25, 2020 · 7 comments
Assignees
Milestone

Comments

@ats1999
Copy link

ats1999 commented Nov 25, 2020

render: function(gl, matrix){
						tb.update();
				}

I found this code in many examples, but when i run this i got

ReferenceError
tb is not defined
@ats1999 ats1999 changed the title In examoples tb is not defined . In examples tb is not defined . Nov 25, 2020
@jscastro76
Copy link
Owner

All the examples are checked with the latest version running on node.js
What’s the example you’re having the issue?

@jscastro76 jscastro76 self-assigned this Nov 27, 2020
@jscastro76 jscastro76 added this to the v2.1.1. milestone Nov 27, 2020
jscastro76 added a commit that referenced this issue Nov 27, 2020
- #107 (#107) CSS2D labels must be refactored to optimize the render #107
- #108 (#108) Deprecate `tb.setLabelZoomRange` #108
- #104 (#104) CSS2DLabels doesn't hide properly based on zoom ranges on setLabelZoomRange #104
@jscastro76 jscastro76 added the ❌ invalid This doesn't seem right label Nov 27, 2020
@jscastro76
Copy link
Owner

I have checked again all the examples and all of them work with no issues or errors.
If you can provide a repro, I'll reopen this issue.

@ats1999
Copy link
Author

ats1999 commented Nov 27, 2020

I have checked again all the examples and all of them work with no issues or errors.
If you can provide a repro, I'll reopen this issue.

It was my folt. I was using this in react.

@sovanyuthchap
Copy link

sovanyuthchap commented Dec 4, 2020

@jscastro76,I installed your framework with npm to my react project and meet this error. Could fix this issue with react? please help me!

@jscastro76
Copy link
Owner

@jscastro76,I installed your framework with npm to my react project and meet this error. Could fix this issue with react? please help me!

Hi @sovanyuthchap, I would need a repro example to help. If you can provide one I could help.

@sovanyuthchap
Copy link

sovanyuthchap commented Dec 8, 2020 via email

@liujun3660105
Copy link

I have the same error and I have found the reason. In AnimationManager.js,it execute the following code

  tb.map.repaint = true;

and the tb is not defined.so you must define the tb as global variable. const tb = window.tb = new ThreeBox(....)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants