i have this code:
With[{ img = ImageResize[ExampleData[{"TestImage", "Lena"}], {escala}]}, size = 1000; escala = 500; proporcion = size/escala; celda = 200; n = size/celda; sub = Subdivide[-1, 1, n]; With[{ dimensions = ImageDimensions[img]}, Manipulate[ grid = Graphics[{}, GridLines -> {sub, sub}, PlotRangePadding -> None, GridLinesStyle -> Directive[White, Thick, Dashing[Tiny], Opacity[0.5]], ImageSize -> ImageDimensions@img]; Overlay[{img, grid}], {{pt, dimensions/2}, Locator, Appearance -> disk[r, White, pt]}, {{pt2, dimensions/2}, Locator, Appearance -> disk[r, Red, pt2]}, {{r, .05, Style["r", Bold, 15]}, .02, .5, .01, ImageSize -> 500}, ControlPlacement -> Top, Initialization :> (disk[r_, color_, pt_] := Graphics[{{Opacity[.4, color], EdgeForm[Black], Disk[{0, 0}, Scaled[r]]}, {Thick, Line[{Scaled@{.5 - r/8, .5}, Scaled@{.5 + r/8, .5}}], Line[{Scaled@{.5, .5 - r/8}, Scaled@{.5, .5 + r/8}}]}, {Text[ Framed[Style[Row[pt, ","], Bold, 12], FrameMargins -> Tiny, Background -> Opacity[.4, White]], Scaled@{.5, .52 + r}]}}, ImageSize -> dimensions])]]] I want to make the GRID optional but i don't know how to enable/disable it in real-time in the Overlay function.
I was thinking about a tick 0->ON 1->OFF, but the real problem is adding this inside Overlay itself.


Manipulate? $\endgroup$