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

151
Visualizações
How to dynamically add multiple polylines from JSON data for leaflet map

I currently have a JSON data feed that provides the data to draw a single polyline on a leaflet map. The JSON data looks like this:

{
   "sonde":{
      "rssi":200,
      "vframe":8042,
      "time":1635258544,
      "id":"R5050699",
      "freq":400.600,
      "type":"RS41",
      "lat":49.229426,
      "lon":21.699082,
      "alt":32745,
      "dir":76,
      "climb":6.1,
      "speed":67.9,
      "launchsite":"Poprad          ",
      "res":0
   },
   "gps":{
      "lat":49.0523,
      "lon":21.282,
      "alt":281,
      "sat":12,
      "speed":0.108548,
      "dir":0,
      "hdop":8
   }
}

In the future I would like to be able to handle multiple sonde instances on the same map so I would need to be able to draw multiple polylines - one polyline per sonde:id

The JSON files will be the same structure and will just send data for additional sonde:id each time that it is polled. Simulation here Currently the data is stored in application session data.

This is the current behaviour that can only accommodate one sonde:id https://ebski.co/ttgo/livemap.html

So I would like to be able to:

  • Handle the sending of more than one sonde:id
  • Be able to draw a polyline for each sonde:id which will be updated with each poll via JSON.

Thank you in advance

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