How to load a custom Google Map in AI2?

120 views
Skip to first unread message

Fabio Rossi

unread,
Jan 29, 2015, 1:53:04 PM1/29/15
to mitappinv...@googlegroups.com
Hi,
I have created some custom map using Google Map editor and share it (for example https://www.google.com/maps/d/edit?mid=zZsDVnNjk-kE.kE5XxXNSQ0c8).
Now, I want to use the Activity starter to open this map in Google Map app. it's possible?
My goal is to create an app that guides the user in a cycling route using its GPS location.

Taifun

unread,
Jan 29, 2015, 2:07:35 PM1/29/15
to mitappinv...@googlegroups.com
what about using the webviewer together with that link?
Taifun

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

SteveJG

unread,
Jan 29, 2015, 5:48:01 PM1/29/15
to mitappinv...@googlegroups.com
The WebViewer will show you map (nice), however there is no simple way to plot GPS location pins.

Using ActivityStarter to just open the web page like this:

Open the browser to a Web page

Use these activity starter properties to open a specific web page:

Action: android.intent.action.VIEW 
DataUri: http://news.google.com

Where your link is substituted for ..news.google...   does not work at all.  Possibly because your link is a secure page.


The simple answer is you can not have the map and plot to it directly with the GPS receiver in a device.      If you know the coordinates of the two alternate corners of your custom map, you could capture the image, place it into a Canvas, scale the Canvas to World location coordinates, and then plot the GPS points on the Canvas using 'Screen' coordinates where   y maps to latitude and x to longitude.

A possible alternative is to use the Map possible in a fusion table as a display and post pins on it.  That too could work for you but you would have a plain vanilla Google Map in the background.

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