We are developing a Real Time Air Pollution Monitoring System in which data are collected from a set of air pollution sensors using NodeMCU and these data are mapped into each locations(gps sensor) using Ubidots map widget. But the problem is that when a new location with the data is added, the previous location data gets erased. But we need to display data in every locations. Kindly help us in finding a solution!
latitude = gps.location.lat();
longitude = gps.location.lng();
float h = dht.readHumidity();
float t = dht.readTemperature();
dtostrf(20, 4, 2, str_val_1);
dtostrf(latitude, 4, 7, str_lat);
dtostrf(longitude, 4, 7, str_lng);
char context[25];
sprintf(context, "\"lat\":%s,\"lng\":%s", str_lat, str_lng);
client.add("gps", 2, context);
client.add("Temp", t, context);
client.add("Hum", h, context);
client.ubidotsPublish("Mapping");
client.add("Temperature", t);
client.add("Humidity", h);
client.ubidotsPublish("DHT");
client.loop();
delay(5000);