     
     //UITableViewDelegate
     func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){
-        if  highlightedLine != nil {
-            mapView.removeOverlay(highlightedLine);
-        }
-        var mapObj=searchResults[indexPath.section][indexPath.row].mapObject;
-
-        if mapObj is GeoBaseEntityPointAnnotation {
-            mapView.selectAnnotation(mapObj as MKAnnotation, animated: true);
-        }
-        else if mapObj is StyledMkPolyline {
-            var line = mapObj as StyledMkPolyline;
-            highlightedLine = HighlightedMkPolyline(points: line.points(), count: line.pointCount);
-            mapView.removeOverlay(line);
-            mapView.addOverlay(highlightedLine);
-            mapView.addOverlay(line);
-            
-        }
-
-    }
-    
+        selectOnMap(searchResults[indexPath.section][indexPath.row])
+    }
     
     
     func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {

    var isleitungenEnabled=true;
    var highlightedLine : HighlightedMkPolyline?;
    
    
    var timer = NSTimer();
    

    func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -> MKOverlayRenderer! {
        
        if overlay is MKPolyline {
            if overlay is GeoBaseEntityStyledMkPolylineAnnotation {
                var polylineRenderer = MKPolylineRenderer(overlay: overlay)
                polylineRenderer.strokeColor = UIColor(red: 228.0/255.0, green: 118.0/255.0, blue: 37.0/255.0, alpha: 0.8);
                polylineRenderer.lineWidth = 2
