How to get directions on Apple maps when I don't have data?

Today I was walking to some place and I checked directions before leaving home using my Wi-Fi. When I was on the sidewalk I looked at my phone and it was giving me live directions and it knew exactly where I was and how many metres till I will need to turn. I don't even have data on my iPhone so how was it giving me directions? Did I get charged? I'm in Ontario and I'm with chatr mobile. I have an iPhone 5.

Unless most of Ontario is wired for Wi-Fi on the street, you've got it twisted. You have Chatr Mobile. You can't have a smartphone, with a bill, and not have internet. Impossible because they won't sell you one that way. Only chance is you have somehow saved it for offline use. Applemaps will do that.
http://www.tuaw.com/2012/10/05/apples-vector-maps-go-further-offline/

http://www.idownloadblog.com/2012/10/05/apple-maps-automatic-caching-offline-navigation/
They make maps you can use offline too. Best luck.
https://itunes.apple.com/...23322?mt=8