     
     //fonction qui initialise les markers des amis sur la carte
     func initContactMarkers() {
-        var annotations = [MKAnnotation]()
-
+        self.annotations = [MKAnnotation]()
+        
         for friend in self.user.friendList!{
             let friendLocation = CLLocationCoordinate2D(latitude: friend.latitude, longitude: friend.longitude)
             let friendAnnotation = UserAnnotation(coordinate: friendLocation, title: friend.pseudo, subtitle: "")
-            annotations.append(friendAnnotation)
-        }
-        
-        self.mapView.addAnnotations(annotations)
+            self.annotations.append(friendAnnotation)
+        }
+        
+        self.mapView.addAnnotations(self.annotations)
         
         if let location = self.mapView.userLocation.location {
             self.centerMapOnLocation(location)

        let params: [String: String] = ["pseudo": self.user.pseudo as String, "latitude": String(self.user.latitude), "longitude": String(self.user.longitude), "state": String(self.user.state)]
        self.apiService.updateLocation(params) { (user, err) in
        }
    }
    
    @IBAction func paramButtonClic(sender: AnyObject) {

    var locationManager = CLLocationManager()
    var pusher : Pusher = Pusher(key: "")
    var channels : [PusherChannel] = []
    var annotations = [MKAnnotation]()
    
    @IBOutlet weak var searchTextField: UITextField!
    @IBOutlet weak var searchIcon: UITextField!
