I don't know about how they do it, but I'd assume they use geo hash.
Similar read: newsletter.systemdesign…