Using Mars technology’s mars3d API and several video fusion written according to the sample code, clicking different web page tags will fly to different locations and turn on Video Fusion there.
var video3D = new mars3d.graphic.Video3D({
// type: mars3d.graphic.Video3D.Type.Image,
// url: videoInfo.pic_url,
type: mars3d.graphic.Video3D.Type.Video,
dom: $("#trailer"),
position: videoInfo.position,
cameraPosition: videoInfo.cameraPosition,
style: videoInfo.style,
showFrustum: videoInfo.showFrustum,
});
gLayer.addGraphic(video3D);
map.setCameraView(videoInfo.view);
However, glayer. Addgraphic (video3d) often appears; report errors. The first call is sure to succeed, and then the second call may fail. After a failure, all methods fail, which will also prevent the call of other methods, such as flight. Error message: unable to:_ 0xc3d9ee add addeventlistener.
After debugging, I found that this DOM element was obtained for the first time
the second time, it was just (forgot the screenshot):
dom:{
selector:#trailer
}
Therefore, the specific reason for the problem is not clear, but it must be related to jQuery. The second time, I don’t know why I didn’t get the DOM elements completely and then pass them in
No, jQuery is fine anyway:
var video3D = new mars3d.graphic.Video3D({
// type: mars3d.graphic.Video3D.Type.Image,
// url: videoInfo.pic_url,
type: mars3d.graphic.Video3D.Type.Video,
dom: document.getElementById("trailer"),
position: videoInfo.position,
cameraPosition: videoInfo.cameraPosition,
style: videoInfo.style,
showFrustum: videoInfo.showFrustum,
});
gLayer.addGraphic(video3D);
map.setCameraView(videoInfo.view);
Read More:
- Remove video with video byte 0, uncaught (in promise) domexception: failed to load because no supported source was f
- Efficient palm line segmentation using u-net context fusion module
- ‘Conversion failed when converting date and/or time from character string.DB-Lib error message 241,
- Video JS can’t play the prompt( CODE:4 MEDIA_ ERR_ SRC_ NOT_ SUPPORTED) No compatible source was found for this video.
- Run time error: “unfolded2d”_ copy“ not implemented for ‘Half‘
- Create a D3D11 application process
- The time of the time database displayed by the front end is inconsistent
- How to get the current time in java time string
- After switching the tidb database, an error could not commit JDBC transaction appears from time to time
- Video download problem of blob type URL
- Python implementation of bilibilibili (B station) video download
- When calling time module – time / datetime in wxPython, an error is reported. Valueerror: unknown locale: zh cn
- The solution of push D command execution error (/ bin / sh: 1: push D: not found) on Ubuntu
- Reading and saving opencv Python video
- RuntimeError: ‘lengths’ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor
- Invalidstorage.notfound when uploading video in alicloud VOD
- Opencv detection yolov4 target detection video stream error
- Implement Ogre video texture with VMR9
- How do I download or save a YouTube video to my computer?
- Video prediction beyond mean square error