     }
     
     override func viewDidLayoutSubviews() {
-        
         // Update map center singelton
         updateMapViewSingeltons()
     }

        }
    }
    
    func updateMapViewSingeltons(){
        //Update map center point singelton
        MapCenterCoordinateSingelton.center.coordinate = mapView.centerCoordinate
        // Update map span singelton
        MapCoordinateSpanSingelton.span.mapSpan = mapView.region.span
        
        
    }
    
}

    func mapView(mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
        // Map region was updated. Update data if we think the user dragged the map.
        
        if (!userInteractionOverride && haveLoadedInitialChargerData) {
            if (DistanceToLocationManager.distanceFromLastDataUpdateLocation(CLLocation(latitude: mapView.centerCoordinate.latitude, longitude: mapView.centerCoordinate.longitude)) > 5000) {
                // Show stored annotations for the new location
                updateAnnotations()
                // Download charging station data for the area
                getAnnotationsFromNewLocation(mapView.centerCoordinate)
                // Update MapViewSingeltons
                updateMapViewSingeltons()
            }
        }
        
