Cannot display the map and mapdata correctly

60 visualizzazioni (ultimi 30 giorni)
Aaron
Aaron il 4 Dic 2024 alle 9:26
Commentato: Christopher Stapels il 6 Dic 2024 alle 14:47
Dear Sir or Madam,
I am testing to use widget to display map and the plotted values.according to the example. But it always shows the big map (see upper picture) instead of showing the more detailed location map picture (see lower picture). Are the 'location' and 'Location', 'Timestamps' are the build-in variables? I put my fields names 'LatitudeX', 'LongitudeY' as in the setting. Please advise how to do and fix it. Many thanks.

Risposte (1)

Christopher Stapels
Christopher Stapels il 4 Dic 2024 alle 14:31
Locations are not automatically filled in. If your device writes data to the fields Latitude and Longitude then they will exist
Like this
https://api.thingspeak.com/update.json?api_key=<write_api_key>&field1=123&lat=43.10&long=71.2
Then then you read the channel data and set location =1 (or true), you get the position data in the response.
mydata=thingSpeakRead(876466,'location',1,'outputformat','timetable')
mydata = 1x6 timetable
Timestamps CounterValue SoilMoisture TemperatureF Latitude Longitude Altitude ____________________ ____________ ____________ ____________ ________ _________ ________ 02-Oct-2019 12:46:58 37 767 66.74 42.299 -71.352 NaN
If you are writing the sensor data to your channel in fields called LattitudeY and LongitudeY you can get the data from those variables for plotting.
mydata=thingSpeakRead(yourChannel,'outputformat','timetable')
(psuedodata)
timeStamps sensordata1 sensordata2 LatitudeX LongitudeY
12:23 1.2 2.3 43.1 77.9
Can you share the link to the example you are refering to?
  4 Commenti
Aaron
Aaron il 6 Dic 2024 alle 8:03
Spostato: Stephen23 il 6 Dic 2024 alle 8:13
Thanks. Could you advise how to use geoplot to display the values of latitude and longitude beside each ploted point. Many thanks.
Christopher Stapels
Christopher Stapels il 6 Dic 2024 alle 14:47
I would use text function to get the valeus on it, after you do the geoplot. There is also annotation, but I think that is better for single callouts not general labeling.

Accedi per commentare.

Community

Più risposte nel  ThingSpeak Community

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by