         let newOrigin = MKMapPoint(x: mRect.origin.x+newSize.width, y: mRect.origin.y+newSize.height)
         return MKMapRect(origin: newOrigin,size: newSize)
     }
-
+    
     
     @IBAction func mapTypeButtonTabbed(sender: AnyObject) {
         switch(mapTypeSegmentedControl.selectedSegmentIndex){
-    
+            
         case 0:
             mapView.mapType=MKMapType.Standard;
         case 1:

        locationManager.requestWhenInUseAuthorization()
        
        gotoUserLocationButton=MKUserTrackingBarButtonItem(mapView:mapView);

        mapToolbar.items!.insert(gotoUserLocationButton,atIndex:0 );
        
//        var mappingLeitung = RKObjectMapping(forClass: Leitung.self);
//        mappingLeitung.addAttributeMappingsFromDictionary([
//            "id":"id",
//            "geom": "wgs84WKT",
//            "typ":"leitungstyp"
//            ]);
//
//        var jsonString="{"id"}";
        

        
        //delegate stuff
        locationManager.delegate=self;

    }
    
    @IBAction func lookUpButtonTabbed(sender: AnyObject) {
        //        if tableView.hidden {
        //            tableView.hidden = false;
        //        }
        //        else {
        //            tableView.hidden = true;
        //        }
        
        //        tableView.selectRowAtIndexPath(NSIndexPath(forRow: 1, inSection: 2), animated: true,scrollPosition: UITableViewScrollPosition.Middle);
        //        tableView(tableView, didSelectRowAtIndexPath: NSIndexPath(forRow: 1, inSection: 2));
        
    }
    
    @IBAction func focusItemTabbed(sender: AnyObject) {
        focusToggle.setOn(!focusToggle.on, animated: true)
    }
    
