CnR CnR - 18 days ago 5
Android Question

How can I put a map that was created in Google Maps in my application?

I created a map with Google Maps that has symbols on it : https://www.google.com/maps/d/u/0/viewer?mid=1IOw_y51yt8YaQeTzgRvoEhn5drk&ll=32.11239510425183%2C34.80320922355645&z=17

I would like to put this map in my android application, is there a way to do so? everything I saw online was to create a map and add markers, but if I already have a map how can I put it?

Answer

You can make a WebView in your Layout, and just load the url in it.

public class Main extends Activity {

private WebView mWebview;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mWebview = new WebView(this);
    mWebview.loadUrl("https://www.google.com/maps/d/u/0/viewer?mid=1IOw_y51yt8YaQeTzgRvoEhn5drk&ll=32.11239510425183%2C34.80320922355645&z=17");
    setContentView(mWebview);
}

}