How should I present multiple point on the map in ThingSpeak Visualization code?

23 ビュー (過去 30 日間)
I am working on showing the coordinate on the map in my ThingSpeak channel. However, it only allow to show 1 coordinate on my created map. How should I hold the previous coordinate, then adding multiple coordinate continuously without refreshing the webpage? (Paid license account)
Hopefully someone can provide your suggestion to me. Thanks in advance.

採用された回答

Christopher Stapels
Christopher Stapels 2022 年 5 月 31 日
編集済み: Christopher Stapels 2022 年 6 月 6 日
I recommend writing the position data to your channel feed in the latitude and longitude fields.
https://api.thingspeak.com/update.json?api_key=xxxxxxxxxxxxxxxx&lat=22.3&long=34.5
Then in your MATLAB visualization, use thingSpeakRead, and set the name-value pair 'location' to true.
ThemeCopy
myData=thingSpeakRead(876466,'Location',true,'outputformat','timetable','numPoints',10);
now you can use geoscatter or any of the other great mapping functions to plot your data.
geoscatter(myData.Latitude,myData.Longitude)
  1 件のコメント
Candy Lau
Candy Lau 2022 年 6 月 4 日
Perfect solution! Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

コミュニティ

その他の回答  ThingSpeak コミュニティ

Community Treasure Hunt

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

Start Hunting!

Translated by