As noted by AppleInsider, Apple Maps now provides transit directions — complete with departure times, multi-modal transfers, and connecting walks — for Madrid, Spain.
The transit directions should work in both the iOS and macOS versions of Maps. However, the latter version apparently as some issues, as some Mac users are getting the message that “Transit information for Madrid is not available.” The addition of Madrid to Maps transit directions is part of a continual expansion of coverage.