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();
  RenderinstructionRect renderinstructionZoomed = renderinstructionsZoomed.putIfAbsent(zoomlevel, () => renderinstruction.forZoomlevel(zoomlevel, 0));
  nodeProperties = NodeProperties(PointOfInterest.simple(center), projection);
  WayProperties wayProperties = WayProperties(Way.simple([minLatLon, maxLatLon]), projection);
  renderInfo = RenderInfoWay(wayProperties, renderinstructionZoomed);
  await PainterFactory().getOrCreateShapePainter(renderInfo!);

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