Cannot read property 'BillboardGraphics' of undefined
GuyChabra opened this issue · 1 comments
GuyChabra commented
I have installed craco-cesium package according to readme instructions.
I am facing the following error
TypeError: Cannot read property 'BillboardGraphics' of undefined
create
node_modules/resium/dist/resium.es.js:1190
1187 | var BillboardGraphics = createCesiumComponent({
1188 | name: "BillboardGraphics",
1189 | create: function (cprops) {
1190 | return new Cesium.BillboardGraphics(cprops); <--- error here
1191 | },
1192 | mount: function (element, context) {
1193 | if (context.entity) {
His is my main
import React from 'react';
import classes from './App.module.scss';
import {BillboardGraphics, Entity, Viewer} from "resium";
import {Cartesian3, Color, createOpenStreetMapImageryProvider} from 'cesium';
const options = {
timeline: false,
animation: false,
baseLayerPicker: false,
homeButton: false,
infoBox: false,
geocoder: false,
sceneModePicker: false,
navigationHelpButton: false,
selectionIndicator: false,
navigationInstructionsInitiallyVisible: false,
orderIndependentTranslucency: false,
fullscreenButton: false,
imageryProvider: createOpenStreetMapImageryProvider({
url: 'https://a.tile.openstreetmap.org/',
}),
};
const App: React.FC = () => {
return (
<div className={classes.App}>
<Viewer full {...options}>
<Entity
name="test"
description="test!!"
position={Cartesian3.fromDegrees(-74.0707383, 40.7117244, 100)}
point={{pixelSize: 20, color: Color.TRANSPARENT}}
onClick={(a, t) => console.log('click', t)}>
<BillboardGraphics
image={'https://cdn2.iconfinder.com/data/icons/circle-icons-1/64/lens-512.png'}
scale={0.06}/>
</Entity>
</Viewer>
</div>
);
};
export default App;
Any clues?
GuyChabra commented
This is a Resium library issue.
An issue in Resium repo was created instead.