Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
How to send custom JSON request from Cesium and process it's request

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:

viewer.scene.imageryLayers.addImageryProvider(new 
  Cesium.UrlTemplateImageryProvider({
   url: `http://localhost:2020/json/{z}/{x}/{y}`
}));

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?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda