Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!