In order to improve “Find My iPhone” feature, Apple added “Send Last Location” function into iOS8. With Send Last Location enabled, an iDevice will automatically ping Apple’s servers with its current location before the battery run out.
To enable Send Last Location, make sure you’re running iOS 8 and go to Settings > iCloud > Find My iPhone. You’ll see the new option for Send Last Location listed at the bottom of the screen. Slide the toggle to on (green) to enable it.
Now when your iPhone is about to run out of battery, it will send one last location update to iCloud as long as it also has an active Internet connection.
Source: Enable ‘Send Last Location’ in iOS 8 to Help Find Your Dead iPhone