title: Unable to retrieve lat and long locations in mapView using swift ios
body: <pre><code>let latitude = NSUserDefaults .standardUserDefaults().valueForKey(klat) as! Double
  
   let longitude = NSUserDefaults .standardUserDefaults().valueForKey(klong) as! Double
  
  
  let location:CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude, longitude)
  
  //Second Location lat and long
  let latitudeSec:CLLocationDegrees = 11.0100
  let longitudeSec:CLLocationDegrees = 77.3620
  
  let locationSec:CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitudeSec, longitudeSec)
  
  let span:MKCoordinateSpan = MKCoordinateSpanMake(1, 1)
  
  let region:MKCoordinateRegion = MKCoordinateRegionMake(location, span)
  
  mapView.setRegion(region, animated: true)
  
  
  let myAn1 = MyAnnotation(title: "Office", coordinate: location,subtitle: "MyOffice");
  </code></pre>
  
  <p>I am unable to retrieve the map locations here which I have stored in the app earlier using NSUserDefaults in the keyword "klat and "klong" It shows the following error:</p>
  
  <blockquote>
    <p>"Could not cast value of type '__NSCFString' (0x1604da4) to 'NSNumber' (0x971800)"</p>
  </blockquote>