Q:

adding coordinates to google map on android

I have parsed some XML data from a URL to display in a list view on an Android device. It works as expected due to some research and help from people on this site.
what I want to do is now take these coordinates and add a map to my project and create an on-click event listener function so that when I click on a particular set of data it can be displayed on the map...I am not sure how to move forward with this.i eventually want to have the option of selecting one at a time to view on the map and also a larger map view with all coordinates
I will post my current result and the code that I have that gets the XML data for me..any help would be much appreciated.current results
part of the Item Class
  public void setLat(Double lat) {
        this.lat = lat;
    }

    public Double getLon() {
        return lon;
    }

    public void setLon(Double lon) {
        this.lon = lon;
    }

    @Override
    public String toString() {
        return (new StringBuilder()).append("title: \n").append(title).append("\n")
                .append("link: ").append(link).append("\n")
                .append("geo-lat: ").append(lat).append("\n")
                .append("geo-lon: ").append(lon).toString();
    }
}

part of the main activity class
   } else if (xpp.getName().equalsIgnoreCase("geo:lat")) {
                    if (insideItem) {
                        //extract the text between <geo:lat> and </geo:lat>
                        item.setLat(Double.valueOf(xpp.nextText()));
                    }
                } else if (xpp.getName().equalsIgnoreCase("geo:long")) {
                    if (insideItem) {
                        //extract the text between <geo:lat> and </geo:lat>
                        item.setLon(Double.valueOf(xpp.nextText()));
                    }
                }
            }

I just don't know how to use these returned values to populate a map in my android project

A:

You will need to generate a Google Maps API key.
Place an ImageView and load this URL into that ImageView:
https://maps.google.com/maps/api/staticmap?center=latitude,longitude&zoom=15&size=1280x720&sensor=false&markers=latitude,longitude&key=YOUR_API_KEY
And on your button's OnClickListener():
String uri = String.format(Locale.ENGLISH, "geo:%f,%f?q=%f,%f",
                    latitude,
                    longitude,
                    latitude,
                    longitude);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);

This will open Google Maps app to those coordinates.

