code: function drawMarker(image, color, zoom) {
          var canvas = document.createElement('canvas');
          var imageSize = options.getMarkerSize(zoom);
          var diameter = Math.min(imageSize.x, imageSize.y);
          canvas.width = diameter;
          canvas.height = diameter;
          var lineWidth = diameter / 10;
          var context = canvas.getContext('2d');
          var centerX = canvas.width / 2;
          var centerY = canvas.height / 2;
          var radius = diameter / 2 - lineWidth;
  
          context.beginPath();
          context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);
          context.fillStyle = color;
          context.fill();
          context.lineWidth = lineWidth;
          context.strokeStyle = 'gray';
          context.stroke();
  
          // var iconWidth = canvas.width;
          // var iconHeight = canvas.height;
          var iconWidth = image.width;
          var iconHeight = image.height;
          context.drawImage(image, 0, 0, image.width, image.height, //
          (canvas.width - iconWidth) / 2, (canvas.height - iconHeight) / 2,
                  iconWidth, iconHeight);
          return canvas;
      }
docs: Update images Update marker size following the zoom (image key: "zoom:type:category")