@Override
  public void paint(Graphics2D g, MapView mv, Bounds box) {
    LatLon min = box.getMin();
    LatLon max = box.getMax();

    Envelope envelope2 =
        new Envelope(
            Math.min(min.lat(), max.lat()),
            Math.max(min.lat(), max.lat()),
            Math.min(min.lon(), max.lon()),
            Math.max(min.lon(), max.lon()));

    ReferencedEnvelope mapArea = new ReferencedEnvelope(envelope2, crsOSMI);

    renderer.setInteractive(false);
    renderer.paint(g, mv.getBounds(), mapArea);
    bIsChanged = false;
  }
  @Override
  public void zoomChanged() {
    MapView mv = Main.map.mapView;
    Bounds bbox = mv.getLatLonBounds(mv.getBounds());

    // Have the user changed view since last time
    if (active && (lastBbox == null || !lastBbox.equals(bbox))) {
      if (task != null) {
        task.cancel();
      }

      // wait 500ms before downloading in case the user is in the middle
      // of a pan/zoom
      task = new Task(bbox);
      timer.schedule(task, Main.pref.getInteger("plugin.continuos_download.wait_time", 500));
      lastBbox = bbox;
    }
  }