From aa6aa49f56e14bc2ee70034a356dc04646884a1e Mon Sep 17 00:00:00 2001 From: ghybs Date: Fri, 28 Oct 2016 16:21:42 +0400 Subject: [PATCH] docstring: improve default icon customization text (#5058) detailed that modifying `L.Icon.Default.prototype.options` only customizes the icon, but it remains an image-based icon. Added a paragraph about completely replacing the default icon, so that it can now be anything (including a divIcon). --- src/layer/marker/Icon.Default.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layer/marker/Icon.Default.js b/src/layer/marker/Icon.Default.js index cb365635..3ee3a07e 100644 --- a/src/layer/marker/Icon.Default.js +++ b/src/layer/marker/Icon.Default.js @@ -7,8 +7,11 @@ * no icon is specified. Points to the blue marker image distributed with Leaflet * releases. * - * In order to change the default icon, just change the properties of `L.Icon.Default.prototype.options` + * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options` * (which is a set of `Icon options`). + * + * If you want to _completely_ replace the default icon, override the + * `L.Marker.prototype.options.icon` with your own icon instead. */ L.Icon.Default = L.Icon.extend({