Could anyone advise me please?

which out of these two Agadir or Essouria would be the best to base ones stay? As I have not yet visited Morocco I'm unsure as to the geography and distances involved. I would like to be near the sea, within distance to visit Marakesh and the desert. preferably using local transport. I could I expect get this information from books etc. but would prefer to hear of other peoples experience.
Many thanks in anticipation of any replies.

Kind regards.