Metropolis and Gotham are stand ins for NYC. Those names were created back in the 30's when using actual locations in the real world was not something you did regularly in comics. DC has a history of making up stupid city names for their heroes. The Flash lives in Capital City fr instance.
When Spiderman was created in the 60's Marvel was dedicated to being more realistic, so they set the teenage spiderman as being a New Yorker through and through.