I've actually had this happen to me repeatedly on two separate days. I attached my phone to my electric bike via a shock mount, in an attempt to get food off campus. I found this nice place I've heard of before and put the location in the map and went. The phone just started shutting down. I ended up coming back to school to make a sandwich after 30 minutes of struggling because I couldn't get it to work. I concluded it could only be one of these things:
1) It was below 10 degrees celsius, maybe that messed with my phone or it's battery case (I can't always walk with my nikon d5100 so I sometimes use my iPhone for photography and video)
2) The temperature messed with the GPS
3) iPhone bug unknown to me
It hasn't happened again and I've gone riding in warmer weather so only time will tell. I don't qualify for the battery replacement program.