Label pictures are not displayed
Address error
When going to reference local images in the .js file, the path should be introduced in the form of require(), modified as follows
billboard: {
image: require("../img/boshi.png"),
pixelOffset: new Cesium.Cartesian2(-120, 0),
// eyeOffset: new Cesium.Cartesian3(0.0, 0.0, 0.0),
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
verticalOrigin: Cesium.VerticalOrigin.CENTER,
// scale: 0.25,
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(100, 20000)
}
Read More:
- [Solution] VUE.js Load a local image with parameters in the script
- [Solved] ERROR Error loading vue.config.js: ERROR Error: Command failed: git describe
- [Solved] Nuxt Import qrcodejs2.js / QRCode.js Error: document is not defined
- Solution to some map files in JS folder after Vue packaging (remove the map. JS file)
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)
- [Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv
- [Solved] Font End Image Display Error: net::ERR_CONNECTION_RESET 431 (Request Header Fields Too Large)
- Vue mutui identify (Image Verification Code)
- The solution to the failure of HTML introducing external JS
- JS uses onerror to automatically catch exceptions
- Vue Package Image Error: Syntax Error: Error: ‘**\node_modules\pngquant-bin\vendor\pngquant.exe‘
- Asynchronous loading method of Baidu map
- JS getting ${pageContext.request.contextPath} Get the root path of the project
- [Solved] PDF.js Error: Cannot use the same canvas during multiple render()
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- JS: How to Solve split, join, toString Use error
- How to Solve Vue loading 3D model Error
- js: SyntaxError: Cannot use import statement outside a module
- Vue JS import font.css error [How to Solve]
- [Solved] mqtt.js Error: n.createConnection is not a function