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();
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?
I read through This post on Stackoverflow, but I have no idea what to do with this code:
googleMap.getCameraPosition().target
target takes a location I think?
Any assistance is appreciated!
Thanks!
I solved this by using the following code:
Then setting the map up:
This get the users location, and when the map loads, it automatically zooms into that location, where you should see a blue dot where you sit!