Chris Gong
Chris Gong

Reputation: 8229

Google Maps SDK Current Location XCode

How would you get my location on xcode working using the google map SDK? I need to make it so it gives the current location when you press on the button for the google maps sdk.

Upvotes: 0

Views: 282

Answers (1)

jorisdegame BOSS
jorisdegame BOSS

Reputation: 28

So what you need to do is go to your project (logic) Then go to the supporting files map and go to info.plist file Then in your Info.plist file add the key NSLocationWhenInUseUsageDescription and in the value bar give it a description like "Your app name" would like to use your current location when you done that go into your ViewController.m file and add the following line of code in your view did load: mapView.myLocationEnabled = YES; I hope this helped. if not you can always ask me questions!

Upvotes: 1

Related Questions