Android select from selectors then display on map
<p>First screen user is ask to select different buttons that are categories then after the categories are selected display the locations in a map. </p>

<p>For example user selects to search for restaurants and bars then click search. Then the next screen will show icons with the locations in the map.</p>

<p>Im confused on how to pass the data from my mainActivity to the MapActivity. </p>

<p>I try to do a loop for each button: but it displays all the buttons I only want to display the selected ones.</p>

<p>----------------Activityone----------------</p>

<pre><code>if (toggleButton5.isChecked()) {

double point3=37326489;
double point4=-121772461;

 Bundle b = new Bundle(); // create a bundle to pass to map activity
      b.putDouble("point3",point3); // bundle the geo points for the map activity and convert to 1e6
      b.putDouble("point4",point4);
      Intent myIntent = new Intent(view.getContext(), Map.class); // create the intent to launch the map
      myIntent.putExtras(b); // attach bundle to map activity
   startActivityForResult(myIntent, 0); // start map activity
   //map things!
}
</code></pre>

<p>----------------MapAcivity----------------               </p>

<pre><code>  Bundle b = this.getIntent().getExtras();
  Drawable drawable1 = this.getResources().getDrawable(R.drawable.button_food_on);
OverlayMap itemizedoverlay2 = new OverlayMap(drawable1, this);

GeoPoint point2 = new GeoPoint((int)(b.getDouble("point3")),(int)   (b.getDouble("point4")));

OverlayItem overlayitem1 = new OverlayItem(point2, "", "");

  itemizedoverlay2.addOverlay(overlayitem1); 
     mapOverlays.add(itemizedoverlay2);
</code></pre>

<hr>

<p>Edit:
first here is an image of the first screen:</p>

<p><img src="http://i.stack.imgur.com/MIiti.png" alt=""></p>
