public AndroidBitmapDescriptor ToNative(Xamarin.Forms.GoogleMaps.BitmapDescriptor descriptor) { var defaultFactory = DefaultBitmapDescriptorFactory.Instance; if (!string.IsNullOrEmpty(descriptor.Id)) { var cacheEntry = _cache.GetOrAdd(descriptor.Id, _ => defaultFactory.ToNative(descriptor)); return(cacheEntry); } return(defaultFactory.ToNative(descriptor)); }
/// <summary> /// Sets the rendering method to use custom bitmap image. /// </summary> /// <param name="image">The BitmapDescriptor image. The number of items will be drawn automatically on top of this image.</param> /// <param name="textColor">The text color.</param> public void SetRenderUsingImage(BitmapDescriptor image, Color textColor) { this.RendererTextColor = textColor; this.RendererImage = image; this.RendererCallback = null; }
/// <summary> /// Sets the rendering method to use custom bitmap image. /// </summary> /// <param name="image">The BitmapDescriptor image. The number of items will be drawn automatically on top of this image.</param> public void SetRenderUsingImage(BitmapDescriptor image) { this.SetRenderUsingImage(image, Color.White); }
public static BitmapDescriptor DefaultMarker(Color color) { return(BitmapDescriptor.DefaultMarker(color, color.GetHashCode().ToString())); }
public static BitmapDescriptor FromView(View view, string id = null) { return(BitmapDescriptor.FromView(view, id)); }
public static BitmapDescriptor FromStream(Stream stream, string id = null) { return(BitmapDescriptor.FromStream(stream, id)); }
public static BitmapDescriptor FromBundle(string bundleName) { return(BitmapDescriptor.FromBundle(bundleName, bundleName)); }
public static BitmapDescriptor DefaultMarker(Color color) { return(BitmapDescriptor.DefaultMarker(color)); }
public static BitmapDescriptor FromView(View view) { return(BitmapDescriptor.FromView(view)); }
public static BitmapDescriptor FromStream(Stream stream) { return(BitmapDescriptor.FromStream(stream)); }