In my previous question here, I had a problem with showing GeoGraphics in a CDF document, but thanks to other users, I was able to solve it. But the code I wrote to test my work gave an error. I tried the code again and I got the same error.
Manipulate::vstype: ControlType -> PopupMenu is not supported for the variable specification {route$$,names}. ControlType -> InputField will be used instead
I tried to initialize the route
variable in the Initialization
option, but my code still does not work. Any Ideas?
Manipulate[
If[route == "All",
ruta = "all routes",
p = Position[names, route][[1, 1]];
If[NumberQ[p] == True,
ruta = p - 1,
ruta = p
]
];
Row[{names, "\n", rp[[All, 1]], "\n", routesPosition[[1]], "\n",
route, "\n", ruta}],
Control @ {route, names},
TrackedSymbols :> {route, names, point},
Initialization :> (
routesPosition =
Import["http://sitiopruebamathematica.altervista.org/rutas.xml",
"XML"];
rp = Cases[routesPosition, XMLElement["ROW", _, _], Infinity] /.
XMLElement[_, _, {val_}] :> val /.
XMLElement["ROW", _, list_] :> list;
names = Insert[rp[[All, 1]], "All", 1];
point = ToExpression[rp[[All, 2]]];
ruta = "all routes";
route = names[[1]];
),
SynchronousInitialization -> False,
SaveDefinitions -> True,
ControlType -> PopupMenu
]