Update object location in Map widget using Ubidots device variables?


#1

Hi all,

I was wondering if it is possible to update an objects position in the map widget using a devices variables?

I currently am able to send calculated latitude and longitude values as variables to my Ubidots devices. I want to use those values to update my objects location on the Map Widget.

NOTE: I am using sensor data sent to MATLAB to calculate latitude and longitude and then am sending these values to Ubidots through MATLAB. Hence the need for a Map object location workaround using device variables.

Thank You


#2

Hey @zferrie,

The Ubidots backend takes the position of a device if one of the variables sent are one called “position”, “location” or “gps” containing the coordinates context respective.

For more information about it, please refer to this article!

If you have any additional doubt, we are here to help! :smiley:

All the best,
Maria C.


#3

Hi @mariahernandez

Thanks for the link.

My confusion comes from the lat/long being sent in one variable. Is there a way to use two variables (one lat, one long) to update the devices location?

Thanks


#4

At the moment the only way to update the device location is through a variable called “gps”, “location” or “coordinates” containing the lat and lng as the context of the respective variable.

I hope this clears your doubts!

All the best,
Maria C,


#5

Thanks @mariahernandez

This gives me a good place to start.

Zach


#6

Great! We are here to help you :smiley:

Welcome to Ubidots!