Exemple #1
0
        internal void GetMvxBindingMarker(Marker marker, IBindingMapAnnotation annotation)
        {
            MvxBindingMarker result = GetMvxBindingMarker();

            result.Marker      = marker;
            result.DataContext = annotation;
        }
Exemple #2
0
 public override void AddAnnotation(IBindingMapAnnotation annotation)
 {
     if (annotation is IBindingMapAnnotation mMarker)
     {
         using (MarkerOptions markerOptions = GetMarkerOptionsForPin(annotation))
             if (markerOptions != null)
             {
                 MvxBindingMarker result = GetMvxBindingMarker();
                 result.DataContext = annotation;
                 markerOptions.SetIcon(result.GetIcon());
                 Marker marker = MapView.GoogleMap.AddMarker(markerOptions);
                 result.Marker = marker;
                 marker.Tag    = new AnnotationTag
                 {
                     Annotation = annotation
                 };
                 if (_markers == null)
                 {
                     _markers = new List <Marker>();
                 }
                 _markers.Add(marker);
             }
     }
 }