Hi everyone, this application reads data from an Arduino, connected via bluetooth.
Among these we have the coordinates (read from a GPS connected to the Arduino), and here I have problems.
I would like to create a linestring that indicates the path created by a series of coordinates, you can't see it but I have already initialized the "global data_in" variable.
Furthermore, here in Italy the MIT map is not loaded.
Can anyone help me?
This information might help you:
A LineString has this format for two coordinates.
[[42.36349079394105,-71.09613418579103],[42.364885996366525,-71.08531951904298]]
To be a LineString, there must be at least to separate coordinates.
I do not understand this comment. The MIT Map component renders a map everywhere but in mainland China. The tool is available everywhere. If the tool is not available on your Tool Pallet, it is probably because your BlocksToolkit is not set to Expert.
regarding the LineString, how can I do what you say?
Regarding the map however, the BlocksToolkit is already set to expert, but the map is not generated (if I drag the map to America it loads it completely)
Ciao, io sono di Torino e la mappa, posto di mettere le coordinate "corrette, visualizza Torino (45.07, 07.69):
You have to tell the map to center on one of the locations in your LineString so you can see it.
Several ways can center the map, the easiest is the Map1.PanTo Block. Enter the latitude, longitude and a zoom value in the empty puzzle pieces.
Dear @Fausto_Locatelli, further to all the maps concerns, please pay attention to the BT receiving block :
it's better to use the following:
In this way you are sure you don't miss any data, because the client (your app) will wait until the Linefeed character is received.
To activate this feature you have to set:
in your screen1 initialization block, and in your Arduino code the LAST sending shall be made with a .println(); (only the last while the previous ones with .print())
It's not that difficult and the advantage is really high: you'll never miss a data in this way.
Best wishes.
Problema risolto, mi interessava la visualizzazione aerea ma ne farò a meno, con l'opzione "roads" vedo anche io correttamente.
The map problem is solved, I was interested in the aerial view but I will do without it, with the "roads" option I can also see correctly.
Regarding the question of the line created by the coordinates, can you help me?
did you read post # 5 ?
which is only available for low zoom sizes in most of the world.
It is time you reread the Map component documentation perhaps.
https://ai2.appinventor.mit.edu/reference/components/maps.html
thanks, now i read post #5. Thank you for your time
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.