• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

How to get the users location and zoom in upon loading maps Android V2

I can display the map and have the button show on the map, when I tap it it does exactly what I want it to do. In my code I have this:
 googleMap.setMyLocationEnabled(true);
 googleMap.getMyLocation();

Open in new window



Is there a way to do this automatically upon loading the map, without having to tap the zoom into location button?

I researched this and found examples on getting the users location, but the examples I found didn't do what I wanted, I am not sure it was code for V2 maps. Surely there must be an easy, code minimal way to do this by now?


Any assistance is appreciated!

Thanks!
0
deucalion0
Asked:
deucalion0
1 Solution
 
Molnar IstvánHelpDesk / ProgrammerCommented:
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now