There are two ways a writer can become synonymous with their city. (There are probably quite a few, but for the purposes of this post, there are two.)
One is to be so successful and/or talented, capturing your country’s truth with such style, that you make the city famous through the public’s interest in your life.
The second is to be from a city so small that they don’t have much choice but to invest in your name.
I think there is an element of both when it comes to James Joyce and Dublin.