Home > front end >  Cesium in using KmlDataSource. Load facilities. 404 KML
Cesium in using KmlDataSource. Load facilities. 404 KML

Time:12-02

 var dataSourcePromise=viewer. DataSources. Add (Cesium. KmlDataSource. Load ('../../SampleData/KML/facilities/facilities. KML ', options)); 


In accordance with cesium website demo writing the earth, called the KML has been impassability, at 404, have met in the great god? How to solve?

CodePudding user response:

Similar this kind of problem and servlet or page problem, can check the path, access configuration, spelling if there is a problem,

CodePudding user response:

reference 1st floor oh_Maxy response:
this kind of problem and servlet or page similar problem, can check the path, access configuration, spelling problem,
thank you for your answer, the path error, but I'll facilities. KML this file on still an error at the same level,

CodePudding user response:

 var kmlDataSource=new Cesium. KmlDataSource (); 
KmlDataSource. LoadUrl (' path/to/KML ');
Viewer. DataSources. Add (kmlDataSource);

CodePudding user response:

reference NANU NANA - reply: 3/f
 var kmlDataSource=new Cesium. KmlDataSource (); 
KmlDataSource. LoadUrl (' path/to/KML ');
Viewer. DataSources. Add (kmlDataSource);

Thank you for your reply, I wrote in the code error: type "KmlDataSource" there is no attribute "loadUrl," ts (2339)
 var options={
Camera: viewer. The scene. The camera,
Canvas: viewer. Scene. Canvas
};

Var kmlDataSource=new Cesium. KmlDataSource (options);
KmlDataSource. LoadUrl (' path/to/KML ');
Viewer. DataSources. Add (kmlDataSource);

CodePudding user response:

Your files in the local or server?

CodePudding user response:

reference NANU NANA - 5 floor response:
your files in the local or server?
file local again, after I download the source code, source code of this file is also in the local folders folder

CodePudding user response:

reference NANU NANA - 5 floor response:
your files in the local or server?


Is the code I wrote is there a problem? Do I have to do,
Need to put the file on the server request?

CodePudding user response:

reference 7 floor into the world's reply:
Quote: refer to fifth floor NANU NANA - response:

Your files in the local or server?


Is the code I wrote is there a problem? Do I have to do,
Need to put the file on the server request?


Well, normally, the file should be on the server,
Some files to trouble in the local,

CodePudding user response:

Need to do

CodePudding user response:

reference NANU NANA - 8 floor response:
Quote: refer to 7th floor into the world response:

Quote: refer to fifth floor NANU NANA - response:

Your files in the local or server?


Is the code I wrote is there a problem? Do I have to do,
Need to put the file on the server request?


Well, normally, the file should be on the server,
Some files to trouble in the local,
need to do

CodePudding user response:

references to the tenth floor into the world's reply:
Quote: refer to the eighth floor NANU NANA - response:

Quote: refer to 7th floor into the world response:

Quote: refer to fifth floor NANU NANA - response:

Your files in the local or server?


Is the code I wrote is there a problem? Do I have to do,
Need to put the file on the server request?


Well, normally, the file should be on the server,
Some files to trouble in the local,
need to do then


Not clear, like
Viewer. The extend (Cesium. ViewerDragDropMixin);
Viewer. DataSources. Add (KmlDataSource fromUrl (' path/to/KML '));
You try, I don't know how make,

CodePudding user response:

KML file extensions to XML can, example: 123. KML don't show, is changed to 123. The XML
  • Related