forZoomlevel method

  1. @override
RenderinstructionIcon forZoomlevel(
  1. int zoomlevel,
  2. int level
)
override

Creates a zoom level specific copy of this icon instruction.

Applies zoom level dependent scaling to bitmap properties while preserving icon identity, positioning, rotation, and font settings.

zoomlevel Target zoom level for scaling calculations Returns a new scaled icon instruction

Implementation

@override
RenderinstructionIcon forZoomlevel(int zoomlevel, int level) {
  RenderinstructionIcon renderinstruction = RenderinstructionIcon(level)
    ..renderinstructionScale(this, zoomlevel)
    ..baseSrcMixinScale(this, zoomlevel)
    ..bitmapSrcMixinScale(this, zoomlevel);
  renderinstruction.id = id;
  renderinstruction.position = position;
  renderinstruction.theta = theta;
  renderinstruction.rotateWithMap = rotateWithMap;
  renderinstruction.codePoint = codePoint;
  renderinstruction.fontFamily = fontFamily;
  return renderinstruction;
}