Skip to first unread message

SUDARSHAN GAVI

unread,
Mar 30, 2019, 12:27:08 AM3/30/19
to MIT App Inventor Forum
can some one guide as to how i can use the in built downloaded map from google maps!!!

SteveJG

unread,
Mar 30, 2019, 8:50:55 AM3/30/19
to MIT App Inventor Forum
You can not legally use an offline downloaded Google Maps using your app built with App Inventor.  Why?  Here is Google's Terms of Service  https://cloud.google.com/maps-platform/terms/#10-license-restrictions]  .  To use a downloaded Google map you MUST use one of Google's map apps or be in violation of Google's policy.  Here is an article discussing this https://stackoverflow.com/questions/16525822/offline-mode-for-android-app-using-the-google-maps-api .  Also, App Inventor does not have the tools necessary to access any downloaded Google Map tiles on your device anyway, so the question is moot.  To use map tiles offline, you would have to use perhaps Android Studio, a professional compiler and obtain an appropriate license from Google.


Google Maps is Google Maps ...you have to follow their api  here: https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2  and download an API key to display their maps using the api .   The easy way to display a Google Map is to use a Static Google Map while connected to the Internet (not offline).     A Google map with AI2  requires being connected to a WIFI/network. and can be accessed either using the WebViewer or the ActivityStarter. 

Yuo can use your own flat maps and post on the image of the map it if you show a map image on a Canvas background (you must know the latitude/longitude of two alternate map corners).then some serious coding to convert World location coordinates (from your GPS receiver) to the Canvas Screen coordinates.  Your flat map can be a screen capture of a real Google Map if you use the app for personal use.

Here is a way you can use a downloaded map image  with App Inventor using a Canvas component.  It works!   https://groups.google.com/forum/#!msg/mitappinventortest/JSAMiqATyx4/2--sTsz5AgAJ;context-place=msg/mitappinventortest/HfqU_V_wsCI/fyYhzlakJ2wJ   The example does not use downloaded Google Map tiles.

Does this answer your question "use the built downloaded map from google maps"?     

Another way to display an offline map, again awkward, is to display a downloaded very low resolution "map" using the MIT Map component  offline.  The component will not display the OpenStreetMap tiles offline but it WILL display map features you code into a json FeatureCollection loaded into your Project that you can use as a 'map'.


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