Skip to content

Instantly share code, notes, and snippets.

@Jamonek
Created March 24, 2015 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jamonek/d1d324f1453bd49589ac to your computer and use it in GitHub Desktop.
Save Jamonek/d1d324f1453bd49589ac to your computer and use it in GitHub Desktop.
Swift calling showRadiusKeyConstant before getCloseLocations()
dispatch_async(dispatch_get_main_queue()) {
if((self.defaults.valueForKey(self.facilityBoolKeyConstant) as Bool) != false) {
self.getCloseLocations("fc")
}
if((self.defaults.valueForKey(self.medicareBoolKeyConstant) as Bool) != false) {
self.getCloseLocations("md")
}
if((self.defaults.valueForKey(self.vaHospitalBoolKeyConstant) as Bool) != false) {
self.getCloseLocations("vh")
}
if((self.defaults.valueForKey(self.vaClinicBoolKeyConstant) as Bool) != false) {
self.getCloseLocations("vc")
}
}
if((self.defaults.valueForKey(self.showRadiusKeyConstant) as Bool) != false) {
println("Called on start: \(self.vHLocations.count)")
var countLocations = self.vHLocations.count
if countLocations > 0 {
//self.mapView.removeOverlays(self.mapView.overlays)
for i in 0..<countLocations {
var vH = self.vHLocations[i] as PinPointAnnotation
var lat = vH.coordinate.latitude
var lon = vH.coordinate.longitude
var radius = CLLocation(latitude: lat as CLLocationDegrees, longitude: lon as CLLocationDegrees)
println("Test insert VA radius initial")
self.addRadiusCircle(radius)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment