changeZoomlevel method

  1. @override
Future<void> changeZoomlevel(
  1. int zoomlevel,
  2. PixelProjection projection
)
override

Implementation

@override
Future<void> changeZoomlevel(int zoomlevel, PixelProjection projection) async {
  //renderInfo?.shapePainter?.dispose();
  RenderinstructionSymbol renderinstructionZoomed = renderinstructionsZoomed.putIfAbsent(zoomlevel, () => renderinstruction.forZoomlevel(zoomlevel, 0));
  NodeProperties nodeProperties = NodeProperties(PointOfInterest.simple(latLong), projection);
  renderInfo = RenderInfoNode(nodeProperties, renderinstructionZoomed);
  renderInfo!.shapePainter = await PainterFactory().getOrCreateShapePainter(renderInfo!);

  // captions needs the new renderinstruction so execute this method after renderInfo is created
  await changeZoomlevelCaptions(zoomlevel, projection);
}