change size of marker in leaflet
icons, javascript, leaflet
Solution
You can get the old icon from the marker itself, change the size of the icon and then call `setIcon` with the changed icon:
var icon = centerMarker.options.icon;
icon.options.iconSize = [newwidth, newheight];
centerMarker.setIcon(icon);
Problem
I have one marker on the map in leaflet: ``` var centerMarker = L.marker(centerPoint, { title: 'unselected' }).bindLabel(schools[i][0]); centerMarker.on('click', selectMarker); centerMarker.addTo(map); ``` I want to change the size of that marker on click. I know that we can change icons but I just want to change the size of the same icon of the marker.