Created
March 24, 2015 01:56
-
-
Save Jamonek/d1d324f1453bd49589ac to your computer and use it in GitHub Desktop.
Swift calling showRadiusKeyConstant before getCloseLocations()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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