             
             if let a = annotation as? CustomerAnnotation {
                 let pinAnnotationView = MKPinAnnotationView(annotation: a, reuseIdentifier: "myPin")
-                let ownerID:String = a.subtitle!
+                //let ownerID:String = a.subtitle!
                 let name = a.title!
-               // let spot = spot
+              let ownerID:String = (a.spot.owner?.objectId)!
                 let pic = UIImageView (image: UIImage(named: "test.png"))
                 pinAnnotationView.canShowCallout = true
                 pinAnnotationView.draggable = false

        spots.append(spot)
        let pinLocation: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: spot.location.latitude, longitude: spot.location.longitude)
        
        let annotation = CustomerAnnotation(coordinate: pinLocation,spotObject: spot, title :spot.owner!.email!, subtitle: spot.spotId)
        annotation.spot = spot
        //annotation.subtitle = "Rating bar here"
        self.mapView.addAnnotation(annotation)

                                let pin = object["SpotGeoPoint"] as? PFGeoPoint
                                let pinLatitude: CLLocationDegrees = pin!.latitude
                                let pinLongtitude: CLLocationDegrees = pin!.longitude
                                 let pinLocation: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: pinLatitude, longitude: pinLongtitude)
                                spotObject.location.latitude = pin!.latitude
                                spotObject.location.longitude = pin!.longitude
                                spotObject.AddressText = object["addressText"] as? String
                                spotObject.spotId = object.objectId!
                                // self.ownerId = object.objectId!
                                spotObject.type = object["type"] as? Int
                                spotObject.rate = object["rate"] as? Double
                                spotObject.timeLeft = object["timeLeft"] as? Int
                                spotObject.minDonation = object["minimumPrice"] as? Int
                                spotObject.legalTime = object["legalTime"] as? String
                                spotObject.timeToLeave = object["leavingTime"] as! NSDate?
                                spotObject.owner = object["owner"] as? PFUser
                                let annotation = CustomerAnnotation(coordinate: pinLocation,spotObject: spotObject, title :spotObject.owner!.email!, subtitle: spotObject.owner!.objectId!)
                                annotation.spot = spotObject
                                //annotation.subtitle = "Rating bar here"
                                self.mapView.addAnnotation(annotation)
