I'm reading a book where the author claims that in order for the method of angles and proportions used by Eratosthenes to work, the two cities would have to be located in the same meridian, or at least reasonably close. Why is this the case? Couldn't I meassure the shadow on a completely different meridian and still figure out the circumference? After all, the stick on the ground and the well on Syene still both point towards the center of the Earth.
The main reason is noon occurs at the same time on a meridian.
The ancients didn't have accurate ways of keeping time, but everyone could tell when noon was because of the position of the Sun in the sky. By prior arrangement it is easy to agree to take the measurements on a particular day at noon. By being taken at noon they know that the measurements are taken at the same time, which was critical to the calculations.
The reason mentioned in the answer of @zlaaemi is of course the most important one: the ancients could easily measure the difference in latitude, but not the difference in longitude. The "problem of longitude" was solved only in 18 century.
But there is also another reason: spherical trigonometry did not exist yet at the time of Erathosthenes. As far as we know, it was developed 300 years later (by Menelaus of Alexandria). So the problem with two laces on different longitude was probably too difficult at the time of Erathosthenes, even mathematically.
Answer to the comment. Suppose you have two cities A and B. To estimate the radius of Earth you need to measure an arc of great circle a) in degrees, and b) in some terrestrial units (say in miles). To achieve a) you need to compare some astronomical observations, it is easy to measure the difference in latitude, but to measure the difference in longitude, your observations must be simultaneous. And how do you achieve this? After 18 century you can transport clocks. But this was not available. In principle, one can use star occultations by the Moon or Lunar eclipses, but again computation of the longitude difference from such observations requires a lot of spherical trigonometry.
There are in principle two possible ways to solve b): first, to travel directly from A to B by an arc of a great circle, and measure the path; this is already a big problem: how do you know the direction of the great circle? Even compass (which was not invented yet) will not help. Second way is the direct triangulation (the method used in 18 century). But to do this you really need a lot of spherical trigonometry and very precise measurement instruments. None of this was available to Eratosthenes. So already problem b) was unsolvable at that time. I recall that they started to practice sailing on the orthodromy (the shortest path) only in the later part of 19 century, mainly because of fuel economy, but also because they just did not know how to do it before that.