Display dynamic title in mapview android
<p>I am displaying multiple points in mapview by using for loop dynamically from the values of api and I am getting the pinpoints but I am unable to display multiple title which I am getting from the api I used to get the title but I am showing the last one again and again on each and every pinpoint. Here is my code. Please help.</p>

<pre><code>for(int i = 0;i&lt;adapt_objgps.latitude_array.length;i++){
    System.out.println("valud oer values:::" +adapt_objgps.latitude_array[1]);
    lat = adapt_objgps.latitude_array[i];
    longit = adapt_objgps.longitude_array[i];
    title = adapt_objgps.title_array[i];
    address = adapt_objgps.address_array[i];

    total = lat+","+longit;
    System.out.println("value of total:::" +total);
    System.out.println("value of title:::"+title);

    mapview = (MapView) findViewById(R.id.mapView);
    mapview.setBuiltInZoomControls(true);

    List&lt;Overlay&gt; mapOverlays = mapview.getOverlays();

    Drawable drawable = myrefgps.getResources().getDrawable(R.drawable.mark_red);
    HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable);

    double dLat = Double.parseDouble(lat) *1E6;
    double dLongotitue =Double.parseDouble(longit) *  1E6;

    int iLat = (int) dLat;
    int iLongtitue = (int) dLongotitue;

    point = new GeoPoint(iLat, -iLongtitue);

    System.out.println("point length::" +point);
    System.out.println("point length::" +title);
    System.out.println("point length::" +address);

    OverlayItem overlayitem = new OverlayItem(point, title,address);
    itemizedoverlay.addOverlay(overlayitem);

    mapOverlays.add(itemizedoverlay);
}
</code></pre>
