1. Check out our companion app, Forums for Android! Download from Google Play

Maps Intent... how to get a pin?

Discussion in 'Android Apps & Games' started by UNEXPECTED62, Mar 25, 2010.

  1. UNEXPECTED62

    UNEXPECTED62 Member
    Thread Starter
    5

    Jan 31, 2010
    8
    0
    5
    [FONT=Courier, Monospaced]I'm launching google maps via an intent. If I supply a latitude and longitude, no pin will be displayed on the map. Is there a way to explicitly tell google maps to add a pin, and what text to put on it?
    [/FONT][FONT=Courier, Monospaced]
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(Uri.parse("geo:" + lat +"," + lon));
    startActivity(intent);

    Currently, this just zooms into a low level of the coordinates, with no pin on what I actually marked.

    [/FONT]
     

    Advertisement

Share This Page

Loading...