Skip to content

Commit

Permalink
Add getIcon function to retrieve marker icon (Leaflet#6459)
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaShabrez authored and Schleuse committed Dec 3, 2019
1 parent fe01419 commit f0173b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/layer/marker/Marker.js
Expand Up @@ -160,6 +160,12 @@ export var Marker = Layer.extend({
return this.update();
},

// @method getIcon: Icon
// Returns the current icon used by the marker
getIcon: function () {
return this.options.icon;
},

// @method setIcon(icon: Icon): this
// Changes the marker icon.
setIcon: function (icon) {
Expand Down

0 comments on commit f0173b7

Please sign in to comment.