Google maps and json list from database

I’ve been playing around with the google maps api’s and in my database I have a column/property that holds json data in the format of a list of objects

[
  {
    "lat": xx.xxxxx,
    "lng": -x.xxxxx
  },
  {
    "lat": xx.xxxxx,
    "lng": -xx.xxxxx
  }
]

To place markers on the google map panel in UI Builder it needs a list of objects that hold lat and lng coordinates. Is there a way to just pass the list I already have from the database rather than calling out each object from the property and then adding it to another list to pass to the google maps panel?

You may create the query to the backendless Data service where for each property the alternative name can be set. Look at the property list:
Example:

prop1 as lat, prop2 as lng
// or
some_function(prop1) as lat, some_function(prop2) as lng

In our documentation look through the function for spatial data types.

1 Like