Apply Formula to location

I have a variable coming out of a device as follows:

 "variable": "gps_info", 
  "value": "true", 
  "location": {
    "lat":latitude, "lng": longitude    

Occasionally the values of lat and lng are zeros. How can I add a formula to the map display to not show these zeros? I would typically do something like "VALUE =0 ? None: VALUE" but how I act on a pair of numbers?

Hi @graemerae,
When the location came with lat and long equal to zero, the map widget ignore this data and it’s not displayed.

Are you sure?

We just took a trip to Null Island!

hi @graemerae,

The map can’t filter by coordinates.

You need to manipulate this data before the data come to the bucket. Where? In the payload parser.

You just insert this code in your payload parser:

const gps_data = payload.find(x => x.variable === 'gps_location');
if (gps_data && gps_data.location && === 0 && gps_data.location.lng === 0) {
    payload = payload.filter(d => d.variable !== 'gps_location');