                // mapView.showAnnotations([mapObject as GeoBaseEntityPointAnnotation], animated: true)
 
             }
-            else if (mapObject is MKPolyline){
-                mapView.addOverlay(mapObject as MKPolyline);
+            else if (mapObject is GeoBaseEntityStyledMkPolylineAnnotation){
+                mapView.addOverlay(mapObject as GeoBaseEntityStyledMkPolylineAnnotation);
+                mapView.addAnnotation(mapObject as GeoBaseEntityStyledMkPolylineAnnotation);
+
             }
             
         }

}

class GeoBaseEntityStyledMkPolylineAnnotation:MKPolyline{
    var geoBaseEntity: GeoBaseEntity

    override init() {

        super.init()
    }
    
    convenience init(line: WKTLine, geoBaseEntity: GeoBaseEntity) {
        self.init()
        let mLine=line.toMapLine();
        mLine.title="."
        self.init(points: mLine.points(), count: mLine.pointCount)
        imageName=geoBaseEntity.getAnnotationImageName();
        callOutLeftImageName=geoBaseEntity.getAnnotationCalloutImageName();
        title=geoBaseEntity.getAnnotationTitle();
        subtitle=geoBaseEntity.getAnnotationSubTitle();
        shouldShowCallout=geoBaseEntity.canShowCallout();
    }
    func getGeoBaseEntity() -> GeoBaseEntity {
        return geoBaseEntity
