Shulchan Aruch Chapter 688: 
The Law of Cities that Had Walls From the Time of Joshua the Son of Nun (8 Chapters)
Note:  REMA in brackets [ ]

1.  Large cities that had walls from the time of Joshua the Son of Nun, even if they currently do not have walls, read the Megillah on the 15th of Adar.  This applies even if they are located in the Diaspora, and even if they do not have 10 idle people [meaning 10 individuals who do not work and engage in the needs of the community].  The places should have had a wall and afterwards settled, or was settled first with the intention of having a wall built later.  With the exception of if it is known that it was settled first without the intention to build a wall [but not if the wall was completed and later settled].

2.  Similarly, this includes villages that are visible from the walled cities.  This is true even if they are not nearby like if they are located on a mountain.  Similarly, they are included even if they are nearby but not visible like in a valley.  However, they can not be farther than a Mil [1].  The exception of the city of Shushan, even if it did not have a wall from the time of Joshua, they read on the 15th since the miracle happened there.

3.  Villages and big cities, and cities that did not have walls from the time of Joshua read the Megillah on the 14th. 

4.  A large city where there is a doubt if it was walled in the days of Joshua the Son of Nun, they read on the 14th, 15th and both nights.  A blessing is only made on the 14th which is the time of reading for the majority of the world.

5.  A resident of a small city who travels to a large city, or a resident of a large city who travels to a small city, the following rule apples:  If he had in mind to return to his place at the time of reading {on the 14th} but got held back and did not return, he reads it as he would in his usual place.  However, if he originally had in mind to return after the time for reading, then he reads with the members of the place where he is at.  [If he is in the desert or a boat, he reads on the 14th like most of the world.]

6.  If the 15th day falls out on the Sabbath (in a walled city from the time of Joshua), we don't read the Megillah on the Sabbath, but rather we move the reading to the Friday before.  Money to the poor is collected and distributed during this day, and on Sabbath we bring out two Torah Scrolls.  Also, on the second day of the week we bring out two Torah scrolls and read "and Amalek came" and we say the Al Hanissim prayer.  We do not make the Purim meal until the first day of the week.

7.  One who sails on the sea or travels in or goes on a caravan [2] and can't find a Megillah to bring along then he should read it on the 13th,12th, or 11th without a blessing.  If he is unable to stall his journey for these days some say that he can even read on the first day of the month.  [And this is the custom.  However, if a Megillah becomes available later then he reads it again on the 14th.  This applies even if he read it already on the 13th since he really read it not in its proper time.]

8.  The resident of a small city who is in a boat or on the road without a Megillah, then afterwards he got one on the 15th, then he reads it on the 15th.

1.  A unit of measurement that is about one mile.
2.  Unsure of exact translation.
Translated by Jay Dinovitser 02/2013