Im working in a school project. I want the user to select categories to be display in map. Im using toggle buttons and the user can select more than one. After the selection is done the user clicks a button that says display on map.
The map its supposed to display all the points from the selected categories.
I created a bundle for each button to be pass some dummy points to the mapActivity.
The problem is that in the mapActivity I dont know how to make the code to display only the selected categories. It displays all the categories in the map.
Here is a screen shot of the main Activity: http://imageshack.us/photo/my-images/831/screenshot20111128at226.png/
Well this is how I wouldve done it:
extrasto the intent that starts the map activity. The extras passed to the intent will depend on which toggle buttons are selected.onCreate()of your map activity get the values from the intents that the previous activity passed and add the points to an array list.This way everytime you start the map activity only the points passed via the intent would get added to the list and hence populate the map. No extra overlay will be added as they wouldnt have been passed into the intent in the first place.