I am using the GeoGraphics function to create a "Hammer" projection of the sky to plot astronomical data. Since every data set has to be mapped using the Hammer projection algorithm individually I am trying to create a template image which I will then overlay the data sets onto. A snippet of the code is below:
Master = Graphics @@
GeoGraphics[{}, GeoRange -> {All, {-180, 180}},
PlotRangePadding -> [email protected],
GeoGridLinesStyle -> Directive[Green, Dashed],
GeoProjection -> "Hammer", GeoGridLines -> Automatic,
GeoBackground -> Black, Axes -> True, ImagePadding -> 1,
ImageSize -> 800,
Ticks -> {Table[{N[i Degree],
Row[{i + 180, " \[Degree]"}]}, {i, -180, 180, 30}],
Table[{N[i Degree], Row[{i, " \[Degree]"}]}, {i, -90, 90, 15}]},
AxesStyle -> White, TicksStyle -> 15];
points2 = {{61.258333`,
50.66875`}, {-58.914583`, -43.44125000000003`}, {79.108333`,
143.166667`}, {41.7275`,
11.38798`}, {38.32`, -23.38583299999999`}, {-78.946139`,
54.731667`}, {-66.98`, 85.412083`}};
HammerLong1 = (2 Sqrt[2] Cos[10.66875] Sin[41.258333/2])/
Sqrt[1 + Cos[10.66875] Cos[41.258333/2]]*180/\[Pi]
HammerLat1 = (Sqrt[2] Sin[10.66875])/
Sqrt[1 + Cos[10.66875] Cos[41.258333/2]]*180/\[Pi]
plot3 = Graphics @@
GeoGraphics[{AbsolutePointSize@7, Blue, Point@GeoPosition@points2,
AbsolutePointSize@14, Green,
Point@GeoPosition@Thread[{HammerLong1, HammerLat1}]},
GeoRange -> {All, {-180, 180}}, PlotRangePadding -> [email protected],
GeoGridLinesStyle -> Directive[Green, Dashed],
GeoProjection -> "Hammer", GeoBackground -> None];
id = ImageDimensions[Master];
Manipulate[Graphics[{Black, Rectangle[{0, 0}, id],
Switch[chart, " Plot 1 ", Inset[Master, Center, Center, id],
" Plot 2 ",Inset[plot3, Center, Center, id]]},
PlotRange -> {{0, First[id]}, {0, Last[id]}},
ImageSize -> id], {{chart, " Plot 1 ",
"Displayed: "}, {" Plot 1 ", " Plot 2 "}},
ControlType -> RadioButtonBar, SaveDefinitions -> True,
AppearanceElements -> "ResetButton"]
As the code is currently written only one radio button can be selected at a time, which doesn't allow me to overlay multiple data sets over the background image.
The solution using Switch was the first success out of many failed efforts to use Manipulate with the pre-computed graphics images, but I have a feeling that it is not the best option. Any and all help would be appreciated!
HammerLong1, HammerLat1
to go :) $\endgroup$