Is there a way to prevent GPS from sleeping when I lock the phone even though google maps app is running?
I just got back from a two week family roadtrip, and we used the Android maps and GPS nearly every day.
The simplest solution I found was to use Google Navigation. It kept the GPS active, even if I put the app in the background, powered off the screen, or locked the screen.
The only way I know how to do this is through Tasker. You can use a tasker profile to set the gps to stay on when the screen turns off. You can also use a profile to keep gps running while the app is open. The only draw back is the price tag (I'm pretty sure it's $5.95 on the market), but you will use this app for more than just keeping gps on, I can promise you that.
If you do end up going this route and need help setting up the profile let me know.