2

I'm trying to get a map up and running in one of my apps and for some reason, maps are not working at all. In my app, I just get a blank image of the grid that shows when maps load and it never loads the map.

I tried running the stock Apple Maps app on the simulator, as well, and I am having the same problem.

Does anybody have any ideas?

shri
  • 856
  • 1
  • 10
  • 26
  • Sometimes iOS Simulator loses internet connectivity. Killing the simulator and running the application again solved the problem for me. – akshay1188 May 07 '15 at 22:58

2 Answers2

1

Just make sure Location is enable from

Simulator options Features->Location->Apple

enter image description here

Dilip Mishra
  • 1,422
  • 13
  • 17
0

I hope you have followed the following steps:

  1. MapView in Interface Builder, connect the map view to the MapView controller swift file.
  2. Just above the mapcenterpinimage property. A popup will appear; set the connection type to Outlet and the name to MapView.
  3. Once you have created the Outlet, request the user location, i.elet locationManager = CLLocationManager()
  4. View did load call these code

locationManager.delegate = self locationManager.requestWhenInUseAuthorization()

You can also follow the below tutorial link, which I found to be very useful. http://www.raywenderlich.com/81103/introduction-google-maps-ios-sdk-swift could be pl. checkout the below stack overflow I have details to support, apple map in Swift.

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
shri
  • 856
  • 1
  • 10
  • 26
  • 1
    Thanks, but I don't want to use Google Maps. –  Apr 04 '15 at 15:48
  • Kelsey, could be pl. checkout the below stack overflow i has details to support, apple map in swift. link,http://stackoverflow.com/questions/28604429/how-to-open-maps-app-programatically-with-coordinates-in-swift?rq=1. Hope it helps you. – shri Apr 04 '15 at 16:52