anchor.diff:  end;
   
   function TSliceDiffGeometryIC.GenerateTileCalc(const aExtent: TExtent; aBitmap: FMX.Graphics.TBitmap; aPixelWidth, aPixelHeight: Double): TGenerateTileStatus;
  -begin
  -  // todo: implement
  -  Result := gtsFailed;
  +var
  +  isgop: TPair<TWDID, TSliceGeometryICObject>;
  +  capacityFactor: Double;
  +  path: TPathData;
  +  bufferExtent: TExtent;
  +  width: Double;
  +  colors: TGeoColors;
  +  refObj: TSliceGeometryICObject;
  +begin
  +  Result := gtsFailed; // sentinel
  +  if Assigned(fPalette) then
  +  begin
  +    aBitmap.Canvas.BeginScene;
  +    try
  +      aBitmap.Canvas.Clear(0);
  +      aBitmap.Canvas.Fill.Kind := TBrushKind.Solid;
  +      capacityFactor := 0.001/Abs(aExtent.YMax-aExtent.YMin);
  +      bufferExtent := aExtent.Inflate(1.3);
  +      fCurrentSlice.fDataLock.BeginRead;
  +      fRefSlice.fDataLock.BeginRead;
  +      try
  +        for isgop in (fCurrentSlice as TSliceGeometryIC).fGeometries do
  +        begin
  +          if bufferExtent.Intersects(isgop.Value.fExtent) then
  +          begin
  +            width := Double.NaN;
  +            // get reference geometry object
  +            if (fRefSlice as TSliceGeometryIC).fGeometries.TryGetValue(isgop.Key, refObj) then
  +            begin
  +              //see if we can find width
  +              if not IsNaN(isgop.Value.value) then
  +              begin
  +                if not IsNaN(refObj.value) then
  +                  width := (isgop.Value.value + refObj.value) / 2
  +                else
  +                  width := isgop.Value.value;
  +              end
  +              else if not IsNaN(refObj.value) then
  +                  width := refObj.value;
  +              //see if we can find color
  +              if not (IsNaN(isgop.Value.texture) or IsNaN(refObj.texture)) then
  +                colors := fPalette.ValueToColors(isgop.Value.texture-refObj.texture)
  +              else
  +                width := Double.NaN;
  +            end;
  +
  +            if isNaN(width) then //either color or value is not valid -> draw a thin black line
  +            begin
  +              path := GeometryToPath(aExtent, aPixelWidth, aPixelHeight, isgop.Value.fGeometry);
  +              try
  +                aBitmap.Canvas.Stroke.Color := TAlphaColorRec.Black or TAlphaColorRec.Alpha;
  +                aBitmap.Canvas.StrokeThickness := 1;
  +                aBitmap.Canvas.DrawPath(path, 1);
  +              finally
  +                path.Free;
  +              end;
  +            end
  +            else //valid color and width -> draw the path
  +            begin
  +              path := GeometryToPath(aExtent, aPixelWidth, aPixelHeight, isgop.Value.fGeometry);
  +              try
  +                aBitmap.Canvas.Stroke.Color := colors.mainColor;
  +                aBitmap.Canvas.StrokeThickness := width*capacityFactor;
  +                aBitmap.Canvas.DrawPath(path, 1);
  +              finally
  +                path.Free;
  +              end;
  +            end;
  +          end;
  +        end;
  +        // todo: process ref geometries not in current? or just skip..
  +      finally
  +        fCurrentSlice.fDataLock.EndRead;
  +        fRefSlice.fDataLock.EndRead;
  +      end;
  +      Result := gtsOk;
  +    finally
  +      aBitmap.Canvas.EndScene;
  +    end;
  +  end
  +  else Log.WriteLn('TSliceDiffGeometryIC layer '+fLayer.LayerID.ToString+': no palette defined', llError);
  +
   end;
   
   { TSliceDiffGeometryICLR }
  
positive.code: begin
    // recalc extent
    fMaxExtent := fCurrentSlice.fMaxExtent.Intersection(fRefSlice.fMaxExtent);
    fLayer.signalRefresh(timeStamp);
  end;
  
  
negative.code:   fileStream: TStream;
    bitmap: FMX.Graphics.TBitmap;
    status: TGenerateTileStatus;
  
  begin
    Result := HSC_ERROR_NOT_FOUND; // sentinel
    status  := gtsRestart; // sentinel
  