for (int i = 0; i < locationmarker.size(); i++){ Latitude = Double.parseDouble(locationmarker.get(i).get("plot_lat_x").toString()); Longitude = Double.parseDouble(locationmarker.get(i).get("plot_long_y").toString()); PlotId = locationmarker.get(i).get("plot_id").toString(); QuotaCode = locationmarker.get(i).get("quota_code").toString(); PlotCode = locationmarker.get(i).get("plot_code").toString(); QuotaName = locationmarker.get(i).get("quota_name").toString(); final MarkerOptions markers = new MarkerOptions().position(new LatLng(Latitude, Longitude)) .title(PlotCode) .snippet("เลขที่โควต้า: "+QuotaCode+" "+QuotaName") .icon(BitmapDescriptorFactory.fromResource(R.drawable.locationred)); //InfoWindowClick & sent parametor to page mMaps.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener(){ @Override public void onInfoWindowClick(Marker marker) { //Toast.makeText(getApplicationContext(), marker.getSnippet(), Toast.LENGTH_LONG).show(); Intent intent = new Intent(MapsActivityCutsugarcane.this,UpdataSugarcutActivity.class); intent.putExtra("QuotaName", QuotaName); startActivity(intent); } }); //Add marker on map from database mMaps.addMarker(markers);