diff --git a/folium/features.py b/folium/features.py index dc9349ef01..1c18f426db 100644 --- a/folium/features.py +++ b/folium/features.py @@ -1862,14 +1862,14 @@ class CustomIcon(Icon): Parameters ---------- - icon_image : string, file or array-like object - The data you want to use as an icon. - * If string, it will be written directly in the output file. - * If file, it's content will be converted as embedded in the - output file. - * If array-like, it will be converted to PNG base64 string - and embedded in the output. - + icon_image : string or array-like object + The data to use as an icon. + + * If string is a path to an image file, its content will be converted and + embedded. + * If string is a URL, it will be linked. + * Otherwise a string will be assumed to be JSON and embedded. + * If array-like, it will be converted to PNG base64 string and embedded. icon_size : tuple of 2 int, optional Size of the icon image in pixels. icon_anchor : tuple of 2 int, optional diff --git a/folium/raster_layers.py b/folium/raster_layers.py index 0ff6ef9948..5e846e9bd2 100644 --- a/folium/raster_layers.py +++ b/folium/raster_layers.py @@ -243,14 +243,17 @@ class ImageOverlay(Layer): Parameters ---------- - image: string, file or array-like object - The data you want to draw on the map. - * If string, it will be written directly in the output file. - * If file, it's content will be converted as embedded in the output file. - * If array-like, it will be converted to PNG base64 string and embedded in the output. + image: string or array-like object + The data to overlay as an image. + + * If string is a path to an image file, its content will be converted and + embedded. + * If string is a URL, it will be linked. + * Otherwise a string will be assumed to be JSON and embedded. + * If array-like, it will be converted to PNG base64 string and embedded. bounds: list/tuple of list/tuple of float Image bounds on the map in the form - [[lat_min, lon_min], [lat_max, lon_max]] + [[lat_min, lon_min], [lat_max, lon_max]] opacity: float, default Leaflet's default (1.0) alt: string, default Leaflet's default ('') origin: ['upper' | 'lower'], optional, default 'upper' diff --git a/folium/utilities.py b/folium/utilities.py index 9210bf59e6..09fd20c5de 100644 --- a/folium/utilities.py +++ b/folium/utilities.py @@ -169,12 +169,14 @@ def image_to_url( Parameters ---------- - image: string, file or array-like object - * If string, it will be written directly in the output file. - * If file, it's content will be converted as embedded in the - output file. - * If array-like, it will be converted to PNG base64 string and - embedded in the output. + image: string or array-like object + * If string is a path to an image file, its content will be converted and + embedded in the output URL. + * If string is a URL, it will be linked in the output URL. + * Otherwise a string will be assumed to be JSON and embedded in the + output URL. + * If array-like, it will be converted to PNG base64 string and embedded in the + output URL. origin: ['upper' | 'lower'], optional, default 'upper' Place the [0, 0] index of the array in the upper left or lower left corner of the axes.