How can i insert a Offline Google-Maps Map in my App ?

708 views
Skip to first unread message

Anatolij Kabakov

unread,
Feb 12, 2017, 9:15:57 AM2/12/17
to MIT App Inventor Forum
Hello,

I´m programming a App with the MIT App Inventor 2 at the moment. I actually made it to connect the Google-Maps Service with the App, which allows me to use it in the App with all the features like the Navigation.
But the Problem at the moment is, i dont know how to insert Offline-Maps with the MIT App Inventor 2. The offline Map should be able to Navigate to. I just need to insert the Map of a little area.

Which possibilities exists to solve my Problem ?

Taifun

unread,
Feb 12, 2017, 10:32:50 AM2/12/17
to MIT App Inventor Forum
you can do a lot using the webviewer together with the Google Maps JavaScript API, see an example here https://puravidaapps.com/geolocation.php

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

SteveJG

unread,
Feb 12, 2017, 4:54:56 PM2/12/17
to MIT App Inventor Forum
Do you want to know how to download Google Map Tiles   or  after, downloaded, how to use them?  This might have been done with Java but to the best of my knowledge has not yet been done with AI2.  All Google Maps are constructed using map Tiles https://developers.google.com/maps/documentation/android-api/tileoverlay  You might check Google regarding the use of their Tiles offline without using a Google map.  It might not be allowed.

You might consider downloading OsmAnd tiles instead  http://osmand.net/features?id=online-maps-plugin    and   http://osmand.net/help/HowToArticles.html  .  The terms of use are more liberal than using Google Map Tiles.


The following Java example might give you some insight regarding using Google Map Tiles:


If you find a solution, please post.   


Now, the Navigation part.  I think you can only use Google's Navigation API if the user is connected to the Internet.

Here is a very simple way to navigate from your device's location to coordinates you specify. It uses ActivityStarter and while not exactly what you are looking for,
it might be useful

The start location is the location provided by your Android Location Services, the destination is the coordinates provided as shown above.

Regards,
Steve



Reply all
Reply to author
Forward
0 new messages