I believe it expects and object with lat and lon properties, not a string. For example:
"devicelocation": { "lat": 53.065151, "lon": -2.478252 }
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm sure this should be really simple to find but i can't see this info anywhere.
What is the required format for the location property on Iot Central? I can see it is geopoint but i have formatted my data as per the below and this doesn't work:
"gps":"lat: 53.065151, lon: -2.478252"
gps in the data handle, i can see the data is sat against the correct data handle in raw data but none of the map tiles are working so i am presuming i have the wrong format?
I believe it expects and object with lat and lon properties, not a string. For example:
"devicelocation": { "lat": 53.065151, "lon": -2.478252 }
I’ve spent most of the day trying to debug this and it’s bizarre, i think i’ve now managed to get everything in the right place but i still get blank maps “Awaiting Data”. I have tried both with and wihout lat: lon: and that made no difference. I don’t really know who to ask as Microsoft don’t appear to offer any kind of support? Any ideas welcome!
My code to get to this point is (summarised a little):
location_format =(String(GPS.latitudeDegrees) + "," + String(GPS.longitudeDegrees));
createEventPayload(27,location_format,longi,lati);void createEventPayload(int temp, String location_format, float longi, float lati)
{
temp=32;
JsonWriterStatic<256> jw;
{
JsonWriterAutoObject obj(&jw);
jw.insertKeyValue("temp", temp);
jw.insertKeyValue("gps", location_format);}
Particle.publish("Test_data", jw.getBuffer(), PRIVATE);
Serial.println("Sent Test Data");
Serial.println(jw.getBuffer());}