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

Angular and Threebox #42

Closed
joshnice opened this issue Sep 8, 2020 · 5 comments
Closed

Angular and Threebox #42

joshnice opened this issue Sep 8, 2020 · 5 comments
Assignees
Labels
❓ question Further information is requested
Milestone

Comments

@joshnice
Copy link

joshnice commented Sep 8, 2020

Hi,

First of all thanks for maintaining Threebox and adding some great features!

In a previous post (#25 (comment)) it was recommend that I created a simple Angular application to have a minimal reproducible example. In this application I have installed Mapbox and Threebox. The error gets thrown whenever the mouse hovers over the map, however I have also added a 3D model successfully with no errors. The error thrown is shown below.

image

Example repo: https://github.com/joshnice/angular_threebox

In the index.html file there is commented out code of a script tag referencing mapbox.js, if this does not have comments around it then the error is not thrown. However if Mapbox is bundled with the Angular application as in this case, I don't think the error should be thrown.

Angular Version: 10.1.0
Mapbox-gl Version: 1.12.0
Threebox Version: 2.0.5 (latest)

@jscastro76
Copy link
Owner

Hi @joshnice
I´ll take a look to it but it seems an issue with your bundle in Angular.

@jscastro76 jscastro76 added the ❓ question Further information is requested label Sep 12, 2020
@luojiandan
Copy link

@joshnice I got the same error in vue. do you solved?

@jscastro76
Copy link
Owner

@joshnice did you finally solve this issue?? I took a look at the code but not being an advanced user in Angular, I couldn´t identify the issue. My feeling is that you will need to add an include to mapbox in Threebox.js file.

@joshnice
Copy link
Author

@luojiandan hi, sorry I have not solved the issue. I have tried a few different things to solve it, such as trying to import it and including it in the scripts array inside the configuration file (this may just be an Angular thing). Unfortunately none of these ways seemed to work. Over the next few weeks I will be experimenting with React, Mapbox and Threebox so it will be interesting if the same issue occurs.

@jscastro76
Copy link
Owner

Hi @joshnice, @luojiandan
This issue is solved, I'm pushing the changes to github

@jscastro76 jscastro76 self-assigned this Nov 8, 2020
@jscastro76 jscastro76 added this to the V2.0.8. milestone Nov 8, 2020
jscastro76 added a commit that referenced this issue Nov 14, 2020
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements

- #73 `tb.dispose` must clean `tb.objectsCache`
- #74 Question: Why is this library not available on npm ?
- #75 Publish in npm
- #76 Refactor Objects.prototype._makeGroup
- #78 refactor var to const and let
- #80 Update example [15-performance.html](https://github.com/jscastro76/threebox/blob/master/examples/15-performance.html) Add built-in animation to example 15-performance.html windmill.
- #82 Add a method `tb.getSunTimes`
- #85 We need an object compare method
- #87 Change `tb.getSunPosition` to accept lnglat coords instead of two params
- #88 Add night style change in 12-add3dmodel.html and 13-eiffel.html examples during night hours

#### 🪲 Bug fixes

- #42 Angular and Threebox. Solved an issue using a `mapboxgl.Point`line
- #77 example 05-logistics raises an error removing the line
- #79 Some examples are not using `renderingMode: 3d` in the layer creation
- #86 After #56 the feature that comes in userData is not being updated.

<br>

- - -
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

3 participants