The EmbeddedScaleDisplayPanel that gets injected into the map display by default doesn't render in screenshots.
So, I've added a ScaleDisplayLayer. Unfortunately, the EmbeddedScaleDisplayPanel is still there. In the picture below, the EmbeddedScaleDisplayPanel is showing 1000km. My ScaleDisplayLayer is showing 1500km.
No matter what I do, I cannot figure out how to remove the existing EmbeddedScaleDisplayPanel though.
I can *find* it using the maphandler:
EmbeddedScaleDisplayPanel esdp = mapHandler.get(EmbeddedScaleDisplayPanel.class);
Unfortunately, none of these things remove it:
mapHandler.remove(esdp); // Symmetric version of how I find it
openMapPanel.removeMapComponent(esdp); // Symmetric version of how it gets added
openMapPanel.findAndUndo(esdp); // A recursive find-and-destroy in the mappanel
So, what's the right way to purge it?
Cheers,
Gary