Display line on google map when i run - tracker pedometer

176 views
Skip to first unread message

Julian

unread,
Jun 28, 2018, 4:28:23 PM6/28/18
to MIT App Inventor Forum

Hi,

I create an app "Pedometer" for running, it's almost finish, but I can't find a way to display my route by line on the map while I run like one of the 2 images below.
It's possible ?

[img]https://i.imgur.com/ZSHX7QC.png[/img]
[img]https://i.imgur.com/ndEQT4F.jpg[/img]


Thanks for help ;)

SteveJG

unread,
Jun 28, 2018, 4:47:28 PM6/28/18
to MIT App Inventor Forum
You can make a trak (or some call it a breadcrumb app) using either a Google Static Map with a WebViewer  or  using the MIT Map component.  Both of these require a WIFI or network connection.  Since you are running, you will need to use data on your device and use network to access the Internet.   

This mini-tutorial shows both ways.


Is this what you want to do Julian?   Either method works; both involve a lot of coding.  


A third way that does not require a network connection uses the Canvas and a Map image you provide.  The example here shows how to plot on the Canvas and a Map.  You can place circles on your trak points (not shown in the example). What needs to be done to use this method is very involved. One way to place connected lines (traks) on this flat map is described here  

I recommend using the MIT Map component.

Have fun with your app.

Regards,
Steve

Julian

unread,
Jun 28, 2018, 4:55:20 PM6/28/18
to MIT App Inventor Forum
Thanks Steve ;)

It's perfect, is that i search ! I will test it tomorow and i tell you if i success.

Best regard

Julian

unread,
Jun 29, 2018, 5:27:53 AM6/29/18
to mitappinv...@googlegroups.com
Hi Steve,

I have a problem because i use both appinventor and thunkable to use admob.

But when i try to open the aia file with thunkable it says "unable to find component map", that is normal and i understand, there isn't component map but it's remplace by "google map".

Have you any solution ?
If i use appinventor there is no problem but i do use thunkable only to admob that is no present in appinventor.

Thanks

SteveJG

unread,
Jun 29, 2018, 7:59:38 AM6/29/18
to mitappinv...@googlegroups.com
Mixing MIT App Inventor 2 and Thunkable or ANY third party AI clone is a terrible idea.  Mixing can result in unpredictable results with a Project that include corruption of the code, unpredictable performance of the App, inability to load the components of one to another and other undesirable effects.  These problems will exacerbate as the clones diverge from the basic OpenSource App Inventor code.

Since you use admob, you should NOT use MIT App Inventor.   Thunkable has its own unique Map component system similar to what is used in App Inventor.  The Map component, in Thunkable uses Google Maps tiles; App Inventor uses OpenStreetMap tiles.  A developer can do more 'things' with the AI Map component.  Thunkable cannot find AI's Maps because Maps is built-in to AI but not Thunkable; Maps is not an extension.  AI does not provide admob and probably never will ( AI is intended primarily as a teaching/educational compiler).  The third party clones are commercial endeavors.

If you need ads, use Thunkable or AppyBuilder.  If you want Ai's simple but elaborate full featured Map capabilities, use App Inventor.    If you use Thunkable,  you probably can use its mapping tool to do something similar or you might modify the Static Map Trak solution to work with Thunkable's mapping component (both use Google Maps).  Thunkable can use Polylines in a way App Inventor uses LineString. It should also be possible to use the Static Map Trak solution with Thunkable (without using T;s Map) . I do not know but think AppyBuilder might use the same  Map component  used by AI.  You could try AB or building Traks with a Static Map or using Thunkable's map component and polylines and let us know what works.

"Use appinventor (and)  there is no problem but i do use thunkable only to admob that is no present in appinventor."  Glad the Traks solution works in App Inventor.

Regards,
Steve
Reply all
Reply to author
Forward
0 new messages