You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a React NextJS project that works fine on localHost. But when I publish it the 3D objects on my map can not be selected. The cursor is the open hand and all I am able to do is pan, rotate and zoom the Mapbox map.
I have been able to emulate the live experience by delaying the instantiation of the Threebox custom layer. This suggests it is because the 3D object has not loaded quickly enough.
Here is the code where I delay after the map style has loaded:
mapRef.current.on('style.load', () => {
// set a delay of 1 second here
setTimeout(() => {
setMapLoaded(true);
}, 3000);
});
this sets state to do the rest. Here is the useEffect for mapLoaded:
I have a React NextJS project that works fine on localHost. But when I publish it the 3D objects on my map can not be selected. The cursor is the open hand and all I am able to do is pan, rotate and zoom the Mapbox map.
I have been able to emulate the live experience by delaying the instantiation of the Threebox custom layer. This suggests it is because the 3D object has not loaded quickly enough.
Here is the code where I delay after the map style has loaded:
this sets state to do the rest. Here is the
useEffect
formapLoaded
:I even tried to set the
enableSelectingObjects
property after the 3D model had loaded. And also trying an update.Again, this all works fine locally.
The text was updated successfully, but these errors were encountered: