1. Are you ready for the Galaxy S20? Here is everything we know so far!

3 locations shows 1

Discussion in 'Android Development' started by SamoZain, Sep 28, 2014.

  1. SamoZain

    SamoZain Newbie
    Thread Starter

    I'm trying to make a 3 locations markers on the google map (maybe more) but the problem is it shows only the first thing that I put (Place 1) .. how can I make the button shows me the 3 markers?

    Code (Text):
    1. zero.setOnClickListener(new OnClickListener() {
    2.  @Override
    3.  public void onClick(View arg0) {
    4.                 String DESTINATION_LOCATION1 = "Place 1";
    5.                 String latit1 = "40.054958";
    6.                 String longit1 = "18.420317";
    7.                 String DESTINATION_LOCATION2 = "Place 2";
    8.                 String latit2 = "39.735692";
    9.                 String longit2 = "19.689583";
    10.                 String DESTINATION_LOCATION3 = "Place 3";
    11.                 String latit3 = "39.567350";
    12.                 String longit3 = "19.854964";
    13.  
    14.                 Intent intent1 = new Intent(android.content.Intent.ACTION_VIEW,
    15.                         Uri.parse("geo:<" + latit1 + ">,<" + longit1 + ">?q=<"
    16.                                 + latit1 + ">,<" + longit1 + ">("
    17.                                 + DESTINATION_LOCATION1 + ")"));
    18.                 startActivity(intent1);
    19.             }        
    20.         });
    It gives a warning under DESTINATION_LOCATION2, latit2, longit2, DESTINATION_LOCATION3, latit3 and longit3 p.s. no GPS
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...

Share This Page

Loading...