I can't think of a way to do this in CouchDB - fundamentally, this doesn't lend itself to map/reduce indexes - in the map function you only have access to one document at a time and in the reduce stage you need to reduce the result (computing the cartesian product would expand it).
If you use another system to precompute the distances between the cities then CouchDB is likely a good fit for storing and querying the result of that cartesian product (to e.g. find the top 10 closest cities). However, you might also want to look at a graph database (Neo4j or Giraph) as well.