Cesium: read json data from local

Author:CSDN @ _乐多_

This article records the js code for reading json data locally.


Article directory


import axios from 'axios';

async drawModelJsonFromLocalFunction() {
    
    
            try {
    
    
                const response = await axios.get('./Apps/output.json');
                // this.jsonData = response.data.section_list;
            } catch (error) {
    
    
                console.error('Error loading JSON file:', error);
            }
        },

Statement:
As an author, I attach great importance to my own works and intellectual property rights. I hereby declare that all my original articles are protected by copyright law and no one may publish them publicly without my authorization.
My articles have been published on some well-known platforms for a fee. I hope that readers can respect intellectual property rights and refrain from infringement. Any act of publishing paid articles on the Internet for free or for a fee (including commercial use) without my authorization will be regarded as infringement of my copyright, and I reserve the right to pursue legal liability.
Thank you readers for your attention and support for my article!

Guess you like

Origin blog.csdn.net/yyyyyyyyyyy_9/article/details/134576209