I’m trying to send a parallel request to a local server(in Nodejs) to get a custom json file(not geojson) like:
app.get('/json/:z/:x/:y', function (req, res) {
return res.status(200).send(JSON.stringify({name:'hello'}));
});
Now I want to request from Cesium whenever any imagery tile is loading by passing z/x/y
To achieve that I’ve created a separate ImageryLayer as given below:
However, Above ImageryLayer is sending request to the server But as the server is not returning any image, i’m getting execptions. Also I don’t know how to add it’s callback to process the response.
So, Is there any best way to send a custom request and process it’s response on the basis of current tile request (z/x/y) ? OR Is there any callback on can we create on default ImageryLayer to know what (z/x/y) was requested?
Welcome to the CesiumJS community! Thank you for taking the time to create a detailed community forum post
To be candid, I do not have a lot of experience writing parallel requests to local servers in Node.js. I will take some time to learn a little bit more about this topic and get back to you. In the meantime, input from the rest of the community would be very helpful! Please let me know if you have any other questions, updates, or concerns.
Sorry for the delayed response - I was at GEOINT all of last week. I am happy to hear that you resolved this issue Please let me know if any other questions arise.