threebox icon indicating copy to clipboard operation
threebox copied to clipboard

vue import error:

Open luojiandan opened this issue 4 years ago • 5 comments

@peterqliu @kronick @McCulloughRT Hi,I need u help:) I import threebox to my project,get error:(,what's wrong? image image image

the threebox.js in static folder,it's ok: image

luojiandan avatar Oct 16 '20 09:10 luojiandan

import image

luojiandan avatar Oct 16 '20 09:10 luojiandan

If that´s your only html, you are missing the required links to mapbox script and css

    <script src="https://api.mapbox.com/mapbox-gl-js/v1.11.1/mapbox-gl.js"></script>
    <link href="https://api.mapbox.com/mapbox-gl-js/v1.11.1/mapbox-gl.css" rel="stylesheet" />

Threebox is a Three.js plugin for Mapbox, Three.js is embedded, but not Mapbox, you need to add it to your project or the link to their js + css

jscastro76 avatar Oct 16 '20 13:10 jscastro76

@jscastro76 thanks your replay:) I work in Vue

Vue:2.5.2 Mapbox-GL:1.12.0 threebox:2.0.4 image image

luojiandan avatar Oct 16 '20 16:10 luojiandan

@jscastro76 Example repo:https://github.com/luojiandan/VueMapboxThreebox

luojiandan avatar Oct 16 '20 16:10 luojiandan

Solved in this fork

jscastro76 avatar Nov 15 '20 19:11 jscastro76